From b1d861d784b2534e4ce70261da71b7e217f95eb9 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 00:58:46 -0500 Subject: [PATCH 01/10] Add generated RBIs/fields --- lib/stripe/resources/account.rb | 234 ++- lib/stripe/resources/account_link.rb | 9 + lib/stripe/resources/account_notice.rb | 32 +- lib/stripe/resources/account_session.rb | 103 ++ lib/stripe/resources/apple_pay_domain.rb | 22 +- lib/stripe/resources/application_fee.rb | 38 +- .../resources/application_fee_refund.rb | 17 + lib/stripe/resources/apps/secret.rb | 26 +- lib/stripe/resources/balance.rb | 59 + lib/stripe/resources/balance_transaction.rb | 38 +- lib/stripe/resources/bank_account.rb | 58 +- lib/stripe/resources/billing/alert.rb | 25 +- .../billing/credit_balance_summary.rb | 25 + .../billing/credit_balance_transaction.rb | 48 +- lib/stripe/resources/billing/credit_grant.rb | 48 +- lib/stripe/resources/billing/meter.rb | 46 +- lib/stripe/resources/billing/meter_event.rb | 15 + .../billing/meter_event_adjustment.rb | 16 + .../resources/billing/meter_event_summary.rb | 15 + .../resources/billing_portal/configuration.rb | 74 +- .../resources/billing_portal/session.rb | 61 + lib/stripe/resources/capability.rb | 38 + .../resources/capital/financing_offer.rb | 49 +- .../resources/capital/financing_summary.rb | 17 + .../capital/financing_transaction.rb | 33 +- lib/stripe/resources/card.rb | 74 +- lib/stripe/resources/cash_balance.rb | 14 + lib/stripe/resources/charge.rb | 451 +++++- lib/stripe/resources/checkout/session.rb | 496 +++++- lib/stripe/resources/climate/order.rb | 59 +- lib/stripe/resources/climate/product.rb | 28 +- lib/stripe/resources/climate/supplier.rb | 22 +- lib/stripe/resources/confirmation_token.rb | 297 ++++ lib/stripe/resources/country_spec.rb | 31 +- lib/stripe/resources/coupon.rb | 48 +- lib/stripe/resources/credit_note.rb | 95 +- lib/stripe/resources/credit_note_line_item.rb | 46 + lib/stripe/resources/customer.rb | 97 +- .../resources/customer_balance_transaction.rb | 27 + .../customer_cash_balance_transaction.rb | 72 + lib/stripe/resources/customer_session.rb | 34 + lib/stripe/resources/discount.rb | 29 + lib/stripe/resources/dispute.rb | 92 +- .../entitlements/active_entitlement.rb | 15 +- lib/stripe/resources/entitlements/feature.rb | 19 +- lib/stripe/resources/ephemeral_key.rb | 13 + lib/stripe/resources/event.rb | 48 +- lib/stripe/resources/exchange_rate.rb | 11 +- lib/stripe/resources/file.rb | 27 +- lib/stripe/resources/file_link.rb | 23 +- .../financial_connections/account.rb | 88 +- .../account_inferred_balance.rb | 13 + .../financial_connections/account_owner.rb | 17 + .../account_ownership.rb | 9 + .../financial_connections/institution.rb | 39 +- .../financial_connections/session.rb | 49 + .../financial_connections/transaction.rb | 32 +- lib/stripe/resources/forwarding/request.rb | 44 +- lib/stripe/resources/funding_instructions.rb | 54 + lib/stripe/resources/gift_cards/card.rb | 41 +- .../resources/gift_cards/transaction.rb | 43 +- .../resources/identity/verification_report.rb | 96 +- .../identity/verification_session.rb | 80 +- lib/stripe/resources/invoice.rb | 341 +++- lib/stripe/resources/invoice_item.rb | 58 +- lib/stripe/resources/invoice_line_item.rb | 83 + lib/stripe/resources/invoice_payment.rb | 34 + .../resources/invoice_rendering_template.rb | 21 +- lib/stripe/resources/issuing/authorization.rb | 133 +- lib/stripe/resources/issuing/card.rb | 90 +- lib/stripe/resources/issuing/cardholder.rb | 80 +- .../issuing/credit_underwriting_record.rb | 61 +- lib/stripe/resources/issuing/dispute.rb | 69 +- .../issuing/dispute_settlement_detail.rb | 27 +- .../issuing/fraud_liability_debit.rb | 21 +- .../issuing/personalization_design.rb | 42 +- .../resources/issuing/physical_bundle.rb | 22 +- lib/stripe/resources/issuing/token.rb | 50 +- lib/stripe/resources/issuing/transaction.rb | 110 +- lib/stripe/resources/line_item.rb | 36 + lib/stripe/resources/login_link.rb | 7 + lib/stripe/resources/mandate.rb | 78 + lib/stripe/resources/margin.rb | 23 +- lib/stripe/resources/order.rb | 204 ++- .../resources/payment_attempt_record.rb | 77 +- lib/stripe/resources/payment_intent.rb | 614 ++++++- lib/stripe/resources/payment_link.rb | 202 ++- lib/stripe/resources/payment_method.rb | 372 ++++- .../resources/payment_method_configuration.rb | 434 ++++- lib/stripe/resources/payment_method_domain.rb | 61 +- lib/stripe/resources/payment_record.rb | 79 + lib/stripe/resources/payout.rb | 60 +- lib/stripe/resources/person.rb | 128 ++ lib/stripe/resources/plan.rb | 56 +- lib/stripe/resources/price.rb | 81 +- lib/stripe/resources/product.rb | 64 +- lib/stripe/resources/product_feature.rb | 12 + lib/stripe/resources/promotion_code.rb | 39 +- lib/stripe/resources/quote.rb | 256 ++- lib/stripe/resources/quote_preview_invoice.rb | 331 ++++ .../quote_preview_subscription_schedule.rb | 159 ++ .../resources/radar/early_fraud_warning.rb | 21 +- lib/stripe/resources/radar/value_list.rb | 27 +- lib/stripe/resources/radar/value_list_item.rb | 21 +- lib/stripe/resources/refund.rb | 134 +- lib/stripe/resources/reporting/report_run.rb | 33 +- lib/stripe/resources/reporting/report_type.rb | 23 +- lib/stripe/resources/reversal.rb | 21 + lib/stripe/resources/review.rb | 40 +- lib/stripe/resources/setup_attempt.rb | 105 +- lib/stripe/resources/setup_intent.rb | 158 +- lib/stripe/resources/shipping_rate.rb | 46 +- .../resources/sigma/scheduled_query_run.rb | 30 +- lib/stripe/resources/source.rb | 195 +++ lib/stripe/resources/source_transaction.rb | 48 + lib/stripe/resources/subscription.rb | 218 ++- lib/stripe/resources/subscription_item.rb | 50 +- lib/stripe/resources/subscription_schedule.rb | 157 +- lib/stripe/resources/tax/association.rb | 36 + lib/stripe/resources/tax/calculation.rb | 72 + .../resources/tax/calculation_line_item.rb | 33 + lib/stripe/resources/tax/form.rb | 79 +- lib/stripe/resources/tax/registration.rb | 383 ++++- lib/stripe/resources/tax/settings.rb | 33 + lib/stripe/resources/tax/transaction.rb | 68 + .../resources/tax/transaction_line_item.rb | 30 + lib/stripe/resources/tax_code.rb | 13 +- lib/stripe/resources/tax_id.rb | 34 +- lib/stripe/resources/tax_rate.rb | 46 +- .../resources/terminal/configuration.rb | 111 +- .../resources/terminal/connection_token.rb | 7 + lib/stripe/resources/terminal/location.rb | 24 +- lib/stripe/resources/terminal/reader.rb | 122 +- .../terminal/reader_collected_data.rb | 16 + .../resources/test_helpers/test_clock.rb | 31 +- lib/stripe/resources/token.rb | 29 + lib/stripe/resources/topup.rb | 37 +- lib/stripe/resources/transfer.rb | 39 +- .../resources/treasury/credit_reversal.rb | 36 +- .../resources/treasury/debit_reversal.rb | 42 +- .../resources/treasury/financial_account.rb | 61 +- .../treasury/financial_account_features.rb | 91 ++ .../resources/treasury/inbound_transfer.rb | 70 +- .../resources/treasury/outbound_payment.rb | 89 +- .../resources/treasury/outbound_transfer.rb | 86 +- .../resources/treasury/received_credit.rb | 74 +- .../resources/treasury/received_debit.rb | 71 +- lib/stripe/resources/treasury/transaction.rb | 46 +- .../resources/treasury/transaction_entry.rb | 38 +- lib/stripe/resources/usage_record.rb | 13 + lib/stripe/resources/usage_record_summary.rb | 18 + .../resources/v2/billing/meter_event.rb | 18 + .../v2/billing/meter_event_adjustment.rb | 20 + .../v2/billing/meter_event_session.rb | 14 + lib/stripe/resources/v2/event.rb | 21 + lib/stripe/resources/v2/event_destination.rb | 49 + lib/stripe/resources/webhook_endpoint.rb | 36 +- rbi/stripe/resources/account.rbi | 666 ++++++++ rbi/stripe/resources/account_link.rbi | 23 + rbi/stripe/resources/account_notice.rbi | 56 + rbi/stripe/resources/account_session.rbi | 219 +++ rbi/stripe/resources/apple_pay_domain.rbi | 26 + rbi/stripe/resources/application_fee.rbi | 60 + .../resources/application_fee_refund.rbi | 36 + rbi/stripe/resources/apps/secret.rbi | 51 + rbi/stripe/resources/balance.rbi | 141 ++ rbi/stripe/resources/balance_transaction.rbi | 70 + rbi/stripe/resources/bank_account.rbi | 112 ++ rbi/stripe/resources/billing/alert.rbi | 47 + .../billing/credit_balance_summary.rbi | 52 + .../billing/credit_balance_transaction.rbi | 84 + rbi/stripe/resources/billing/credit_grant.rbi | 77 + rbi/stripe/resources/billing/meter.rbi | 69 + rbi/stripe/resources/billing/meter_event.rbi | 32 + .../billing/meter_event_adjustment.rbi | 32 + .../resources/billing/meter_event_summary.rbi | 32 + .../billing_portal/configuration.rbi | 131 ++ .../resources/billing_portal/session.rbi | 126 ++ rbi/stripe/resources/capability.rbi | 98 ++ .../resources/capital/financing_offer.rbi | 90 ++ .../resources/capital/financing_summary.rbi | 53 + .../capital/financing_transaction.rbi | 66 + rbi/stripe/resources/card.rbi | 117 ++ rbi/stripe/resources/cash_balance.rbi | 29 + rbi/stripe/resources/charge.rbi | 1165 +++++++++++++ rbi/stripe/resources/checkout/session.rbi | 949 +++++++++++ rbi/stripe/resources/climate/order.rbi | 105 ++ rbi/stripe/resources/climate/product.rbi | 48 + rbi/stripe/resources/climate/supplier.rbi | 43 + rbi/stripe/resources/confirmation_token.rbi | 796 +++++++++ rbi/stripe/resources/country_spec.rbi | 55 + rbi/stripe/resources/coupon.rbi | 72 + rbi/stripe/resources/credit_note.rbi | 168 ++ .../resources/credit_note_line_item.rbi | 87 + rbi/stripe/resources/customer.rbi | 182 +++ .../customer_balance_transaction.rbi | 52 + .../customer_cash_balance_transaction.rbi | 126 ++ rbi/stripe/resources/customer_session.rbi | 72 + rbi/stripe/resources/discount.rbi | 52 + rbi/stripe/resources/dispute.rbi | 254 +++ .../entitlements/active_entitlement.rbi | 25 + rbi/stripe/resources/entitlements/feature.rbi | 32 + rbi/stripe/resources/ephemeral_key.rbi | 25 + rbi/stripe/resources/event.rbi | 108 ++ rbi/stripe/resources/exchange_rate.rbi | 42 + rbi/stripe/resources/file.rbi | 47 + rbi/stripe/resources/file_link.rbi | 37 + .../financial_connections/account.rbi | 145 ++ .../account_inferred_balance.rbi | 26 + .../financial_connections/account_owner.rbi | 34 + .../account_ownership.rbi | 22 + .../financial_connections/institution.rbi | 60 + .../financial_connections/session.rbi | 81 + .../financial_connections/transaction.rbi | 52 + rbi/stripe/resources/forwarding/request.rbi | 92 ++ rbi/stripe/resources/funding_instructions.rbi | 183 +++ rbi/stripe/resources/gift_cards/card.rbi | 70 + .../resources/gift_cards/transaction.rbi | 77 + .../identity/verification_report.rbi | 223 +++ .../identity/verification_session.rbi | 159 ++ rbi/stripe/resources/invoice.rbi | 670 ++++++++ rbi/stripe/resources/invoice_item.rbi | 99 ++ rbi/stripe/resources/invoice_line_item.rbi | 146 ++ rbi/stripe/resources/invoice_payment.rbi | 63 + .../resources/invoice_rendering_template.rbi | 33 + .../resources/issuing/authorization.rbi | 291 ++++ rbi/stripe/resources/issuing/card.rbi | 194 +++ rbi/stripe/resources/issuing/cardholder.rbi | 153 ++ .../issuing/credit_underwriting_record.rbi | 111 ++ rbi/stripe/resources/issuing/dispute.rbi | 173 ++ .../issuing/dispute_settlement_detail.rbi | 43 + .../issuing/fraud_liability_debit.rbi | 34 + .../issuing/personalization_design.rbi | 71 + .../resources/issuing/physical_bundle.rbi | 39 + rbi/stripe/resources/issuing/token.rbi | 120 ++ rbi/stripe/resources/issuing/transaction.rbi | 237 +++ rbi/stripe/resources/line_item.rbi | 65 + rbi/stripe/resources/login_link.rbi | 17 + rbi/stripe/resources/mandate.rbi | 164 ++ rbi/stripe/resources/margin.rbi | 36 + rbi/stripe/resources/order.rbi | 446 +++++ .../resources/payment_attempt_record.rbi | 155 ++ rbi/stripe/resources/payment_intent.rbi | 1435 +++++++++++++++++ rbi/stripe/resources/payment_link.rbi | 341 ++++ rbi/stripe/resources/payment_method.rbi | 780 +++++++++ .../payment_method_configuration.rbi | 827 ++++++++++ .../resources/payment_method_domain.rbi | 94 ++ rbi/stripe/resources/payment_record.rbi | 164 ++ rbi/stripe/resources/payout.rbi | 99 ++ rbi/stripe/resources/person.rbi | 294 ++++ rbi/stripe/resources/plan.rbi | 99 ++ rbi/stripe/resources/price.rbi | 162 ++ rbi/stripe/resources/product.rbi | 110 ++ rbi/stripe/resources/product_feature.rbi | 25 + rbi/stripe/resources/promotion_code.rbi | 64 + rbi/stripe/resources/quote.rbi | 527 ++++++ .../resources/quote_preview_invoice.rbi | 663 ++++++++ .../quote_preview_subscription_schedule.rbi | 357 ++++ .../resources/radar/early_fraud_warning.rbi | 37 + rbi/stripe/resources/radar/value_list.rbi | 45 + .../resources/radar/value_list_item.rbi | 36 + rbi/stripe/resources/refund.rbi | 263 +++ rbi/stripe/resources/reporting/report_run.rbi | 70 + .../resources/reporting/report_type.rbi | 44 + rbi/stripe/resources/reversal.rbi | 50 + rbi/stripe/resources/review.rbi | 75 + rbi/stripe/resources/setup_attempt.rbi | 283 ++++ rbi/stripe/resources/setup_intent.rbi | 345 ++++ rbi/stripe/resources/shipping_rate.rbi | 77 + .../resources/sigma/scheduled_query_run.rbi | 50 + rbi/stripe/resources/source.rbi | 668 ++++++++ rbi/stripe/resources/source_transaction.rbi | 105 ++ rbi/stripe/resources/subscription.rbi | 375 +++++ rbi/stripe/resources/subscription_item.rbi | 70 + .../resources/subscription_schedule.rbi | 349 ++++ rbi/stripe/resources/tax/association.rbi | 66 + rbi/stripe/resources/tax/calculation.rbi | 185 +++ .../resources/tax/calculation_line_item.rbi | 74 + rbi/stripe/resources/tax/form.rbi | 126 ++ rbi/stripe/resources/tax/registration.rbi | 627 +++++++ rbi/stripe/resources/tax/settings.rbi | 65 + rbi/stripe/resources/tax/transaction.rbi | 160 ++ .../resources/tax/transaction_line_item.rbi | 52 + rbi/stripe/resources/tax_code.rbi | 20 + rbi/stripe/resources/tax_id.rbi | 62 + rbi/stripe/resources/tax_rate.rbi | 72 + .../resources/terminal/configuration.rbi | 220 +++ .../resources/terminal/connection_token.rbi | 21 + rbi/stripe/resources/terminal/location.rbi | 50 + rbi/stripe/resources/terminal/reader.rbi | 267 +++ .../terminal/reader_collected_data.rbi | 32 + .../resources/test_helpers/test_clock.rbi | 50 + rbi/stripe/resources/token.rbi | 64 + rbi/stripe/resources/topup.rbi | 60 + rbi/stripe/resources/transfer.rbi | 68 + .../resources/treasury/credit_reversal.rbi | 56 + .../resources/treasury/debit_reversal.rbi | 63 + .../resources/treasury/financial_account.rbi | 105 ++ .../treasury/financial_account_features.rbi | 201 +++ .../resources/treasury/inbound_transfer.rbi | 136 ++ .../resources/treasury/outbound_payment.rbi | 178 ++ .../resources/treasury/outbound_transfer.rbi | 171 ++ .../resources/treasury/received_credit.rbi | 151 ++ .../resources/treasury/received_debit.rbi | 141 ++ rbi/stripe/resources/treasury/transaction.rbi | 89 + .../resources/treasury/transaction_entry.rbi | 77 + rbi/stripe/resources/usage_record.rbi | 31 + rbi/stripe/resources/usage_record_summary.rbi | 35 + .../resources/v2/billing/meter_event.rbi | 36 + .../v2/billing/meter_event_adjustment.rbi | 39 + .../v2/billing/meter_event_session.rbi | 30 + rbi/stripe/resources/v2/event.rbi | 42 + rbi/stripe/resources/v2/event_destination.rbi | 82 + rbi/stripe/resources/webhook_endpoint.rbi | 53 + 314 files changed, 36544 insertions(+), 214 deletions(-) create mode 100644 rbi/stripe/resources/account.rbi create mode 100644 rbi/stripe/resources/account_link.rbi create mode 100644 rbi/stripe/resources/account_notice.rbi create mode 100644 rbi/stripe/resources/account_session.rbi create mode 100644 rbi/stripe/resources/apple_pay_domain.rbi create mode 100644 rbi/stripe/resources/application_fee.rbi create mode 100644 rbi/stripe/resources/application_fee_refund.rbi create mode 100644 rbi/stripe/resources/apps/secret.rbi create mode 100644 rbi/stripe/resources/balance.rbi create mode 100644 rbi/stripe/resources/balance_transaction.rbi create mode 100644 rbi/stripe/resources/bank_account.rbi create mode 100644 rbi/stripe/resources/billing/alert.rbi create mode 100644 rbi/stripe/resources/billing/credit_balance_summary.rbi create mode 100644 rbi/stripe/resources/billing/credit_balance_transaction.rbi create mode 100644 rbi/stripe/resources/billing/credit_grant.rbi create mode 100644 rbi/stripe/resources/billing/meter.rbi create mode 100644 rbi/stripe/resources/billing/meter_event.rbi create mode 100644 rbi/stripe/resources/billing/meter_event_adjustment.rbi create mode 100644 rbi/stripe/resources/billing/meter_event_summary.rbi create mode 100644 rbi/stripe/resources/billing_portal/configuration.rbi create mode 100644 rbi/stripe/resources/billing_portal/session.rbi create mode 100644 rbi/stripe/resources/capability.rbi create mode 100644 rbi/stripe/resources/capital/financing_offer.rbi create mode 100644 rbi/stripe/resources/capital/financing_summary.rbi create mode 100644 rbi/stripe/resources/capital/financing_transaction.rbi create mode 100644 rbi/stripe/resources/card.rbi create mode 100644 rbi/stripe/resources/cash_balance.rbi create mode 100644 rbi/stripe/resources/charge.rbi create mode 100644 rbi/stripe/resources/checkout/session.rbi create mode 100644 rbi/stripe/resources/climate/order.rbi create mode 100644 rbi/stripe/resources/climate/product.rbi create mode 100644 rbi/stripe/resources/climate/supplier.rbi create mode 100644 rbi/stripe/resources/confirmation_token.rbi create mode 100644 rbi/stripe/resources/country_spec.rbi create mode 100644 rbi/stripe/resources/coupon.rbi create mode 100644 rbi/stripe/resources/credit_note.rbi create mode 100644 rbi/stripe/resources/credit_note_line_item.rbi create mode 100644 rbi/stripe/resources/customer.rbi create mode 100644 rbi/stripe/resources/customer_balance_transaction.rbi create mode 100644 rbi/stripe/resources/customer_cash_balance_transaction.rbi create mode 100644 rbi/stripe/resources/customer_session.rbi create mode 100644 rbi/stripe/resources/discount.rbi create mode 100644 rbi/stripe/resources/dispute.rbi create mode 100644 rbi/stripe/resources/entitlements/active_entitlement.rbi create mode 100644 rbi/stripe/resources/entitlements/feature.rbi create mode 100644 rbi/stripe/resources/ephemeral_key.rbi create mode 100644 rbi/stripe/resources/event.rbi create mode 100644 rbi/stripe/resources/exchange_rate.rbi create mode 100644 rbi/stripe/resources/file.rbi create mode 100644 rbi/stripe/resources/file_link.rbi create mode 100644 rbi/stripe/resources/financial_connections/account.rbi create mode 100644 rbi/stripe/resources/financial_connections/account_inferred_balance.rbi create mode 100644 rbi/stripe/resources/financial_connections/account_owner.rbi create mode 100644 rbi/stripe/resources/financial_connections/account_ownership.rbi create mode 100644 rbi/stripe/resources/financial_connections/institution.rbi create mode 100644 rbi/stripe/resources/financial_connections/session.rbi create mode 100644 rbi/stripe/resources/financial_connections/transaction.rbi create mode 100644 rbi/stripe/resources/forwarding/request.rbi create mode 100644 rbi/stripe/resources/funding_instructions.rbi create mode 100644 rbi/stripe/resources/gift_cards/card.rbi create mode 100644 rbi/stripe/resources/gift_cards/transaction.rbi create mode 100644 rbi/stripe/resources/identity/verification_report.rbi create mode 100644 rbi/stripe/resources/identity/verification_session.rbi create mode 100644 rbi/stripe/resources/invoice.rbi create mode 100644 rbi/stripe/resources/invoice_item.rbi create mode 100644 rbi/stripe/resources/invoice_line_item.rbi create mode 100644 rbi/stripe/resources/invoice_payment.rbi create mode 100644 rbi/stripe/resources/invoice_rendering_template.rbi create mode 100644 rbi/stripe/resources/issuing/authorization.rbi create mode 100644 rbi/stripe/resources/issuing/card.rbi create mode 100644 rbi/stripe/resources/issuing/cardholder.rbi create mode 100644 rbi/stripe/resources/issuing/credit_underwriting_record.rbi create mode 100644 rbi/stripe/resources/issuing/dispute.rbi create mode 100644 rbi/stripe/resources/issuing/dispute_settlement_detail.rbi create mode 100644 rbi/stripe/resources/issuing/fraud_liability_debit.rbi create mode 100644 rbi/stripe/resources/issuing/personalization_design.rbi create mode 100644 rbi/stripe/resources/issuing/physical_bundle.rbi create mode 100644 rbi/stripe/resources/issuing/token.rbi create mode 100644 rbi/stripe/resources/issuing/transaction.rbi create mode 100644 rbi/stripe/resources/line_item.rbi create mode 100644 rbi/stripe/resources/login_link.rbi create mode 100644 rbi/stripe/resources/mandate.rbi create mode 100644 rbi/stripe/resources/margin.rbi create mode 100644 rbi/stripe/resources/order.rbi create mode 100644 rbi/stripe/resources/payment_attempt_record.rbi create mode 100644 rbi/stripe/resources/payment_intent.rbi create mode 100644 rbi/stripe/resources/payment_link.rbi create mode 100644 rbi/stripe/resources/payment_method.rbi create mode 100644 rbi/stripe/resources/payment_method_configuration.rbi create mode 100644 rbi/stripe/resources/payment_method_domain.rbi create mode 100644 rbi/stripe/resources/payment_record.rbi create mode 100644 rbi/stripe/resources/payout.rbi create mode 100644 rbi/stripe/resources/person.rbi create mode 100644 rbi/stripe/resources/plan.rbi create mode 100644 rbi/stripe/resources/price.rbi create mode 100644 rbi/stripe/resources/product.rbi create mode 100644 rbi/stripe/resources/product_feature.rbi create mode 100644 rbi/stripe/resources/promotion_code.rbi create mode 100644 rbi/stripe/resources/quote.rbi create mode 100644 rbi/stripe/resources/quote_preview_invoice.rbi create mode 100644 rbi/stripe/resources/quote_preview_subscription_schedule.rbi create mode 100644 rbi/stripe/resources/radar/early_fraud_warning.rbi create mode 100644 rbi/stripe/resources/radar/value_list.rbi create mode 100644 rbi/stripe/resources/radar/value_list_item.rbi create mode 100644 rbi/stripe/resources/refund.rbi create mode 100644 rbi/stripe/resources/reporting/report_run.rbi create mode 100644 rbi/stripe/resources/reporting/report_type.rbi create mode 100644 rbi/stripe/resources/reversal.rbi create mode 100644 rbi/stripe/resources/review.rbi create mode 100644 rbi/stripe/resources/setup_attempt.rbi create mode 100644 rbi/stripe/resources/setup_intent.rbi create mode 100644 rbi/stripe/resources/shipping_rate.rbi create mode 100644 rbi/stripe/resources/sigma/scheduled_query_run.rbi create mode 100644 rbi/stripe/resources/source.rbi create mode 100644 rbi/stripe/resources/source_transaction.rbi create mode 100644 rbi/stripe/resources/subscription.rbi create mode 100644 rbi/stripe/resources/subscription_item.rbi create mode 100644 rbi/stripe/resources/subscription_schedule.rbi create mode 100644 rbi/stripe/resources/tax/association.rbi create mode 100644 rbi/stripe/resources/tax/calculation.rbi create mode 100644 rbi/stripe/resources/tax/calculation_line_item.rbi create mode 100644 rbi/stripe/resources/tax/form.rbi create mode 100644 rbi/stripe/resources/tax/registration.rbi create mode 100644 rbi/stripe/resources/tax/settings.rbi create mode 100644 rbi/stripe/resources/tax/transaction.rbi create mode 100644 rbi/stripe/resources/tax/transaction_line_item.rbi create mode 100644 rbi/stripe/resources/tax_code.rbi create mode 100644 rbi/stripe/resources/tax_id.rbi create mode 100644 rbi/stripe/resources/tax_rate.rbi create mode 100644 rbi/stripe/resources/terminal/configuration.rbi create mode 100644 rbi/stripe/resources/terminal/connection_token.rbi create mode 100644 rbi/stripe/resources/terminal/location.rbi create mode 100644 rbi/stripe/resources/terminal/reader.rbi create mode 100644 rbi/stripe/resources/terminal/reader_collected_data.rbi create mode 100644 rbi/stripe/resources/test_helpers/test_clock.rbi create mode 100644 rbi/stripe/resources/token.rbi create mode 100644 rbi/stripe/resources/topup.rbi create mode 100644 rbi/stripe/resources/transfer.rbi create mode 100644 rbi/stripe/resources/treasury/credit_reversal.rbi create mode 100644 rbi/stripe/resources/treasury/debit_reversal.rbi create mode 100644 rbi/stripe/resources/treasury/financial_account.rbi create mode 100644 rbi/stripe/resources/treasury/financial_account_features.rbi create mode 100644 rbi/stripe/resources/treasury/inbound_transfer.rbi create mode 100644 rbi/stripe/resources/treasury/outbound_payment.rbi create mode 100644 rbi/stripe/resources/treasury/outbound_transfer.rbi create mode 100644 rbi/stripe/resources/treasury/received_credit.rbi create mode 100644 rbi/stripe/resources/treasury/received_debit.rbi create mode 100644 rbi/stripe/resources/treasury/transaction.rbi create mode 100644 rbi/stripe/resources/treasury/transaction_entry.rbi create mode 100644 rbi/stripe/resources/usage_record.rbi create mode 100644 rbi/stripe/resources/usage_record_summary.rbi create mode 100644 rbi/stripe/resources/v2/billing/meter_event.rbi create mode 100644 rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi create mode 100644 rbi/stripe/resources/v2/billing/meter_event_session.rbi create mode 100644 rbi/stripe/resources/v2/event.rbi create mode 100644 rbi/stripe/resources/v2/event_destination.rbi create mode 100644 rbi/stripe/resources/webhook_endpoint.rbi diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index aaa3f36f9..959879456 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -34,6 +34,236 @@ def self.object_name nested_resource_class_methods :login_link, operations: %i[create] nested_resource_class_methods :person, operations: %i[create retrieve update delete list] + class BusinessProfile < Stripe::StripeObject + class AnnualRevenue < Stripe::StripeObject + attr_reader :amount, :currency, :fiscal_year_end + end + + class MonthlyEstimatedRevenue < Stripe::StripeObject + attr_reader :amount, :currency + end + + class SupportAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :annual_revenue, :estimated_worker_count, :mcc, :monthly_estimated_revenue, :name, :product_description, :support_address, :support_email, :support_phone, :support_url, :url + end + + class Capabilities < Stripe::StripeObject + attr_reader :acss_debit_payments, :affirm_payments, :afterpay_clearpay_payments, :alma_payments, :amazon_pay_payments, :au_becs_debit_payments, :bacs_debit_payments, :bancontact_payments, :bank_transfer_payments, :blik_payments, :boleto_payments, :card_issuing, :card_payments, :cartes_bancaires_payments, :cashapp_payments, :eps_payments, :fpx_payments, :gb_bank_transfer_payments, :giropay_payments, :gopay_payments, :grabpay_payments, :id_bank_transfer_payments, :id_bank_transfer_payments_bca, :ideal_payments, :india_international_payments, :jcb_payments, :jp_bank_transfer_payments, :kakao_pay_payments, :klarna_payments, :konbini_payments, :kr_card_payments, :legacy_payments, :link_payments, :mb_way_payments, :mobilepay_payments, :multibanco_payments, :mx_bank_transfer_payments, :naver_pay_payments, :oxxo_payments, :p24_payments, :payco_payments, :paynow_payments, :paypal_payments, :payto_payments, :promptpay_payments, :qris_payments, :rechnung_payments, :revolut_pay_payments, :samsung_pay_payments, :sepa_bank_transfer_payments, :sepa_debit_payments, :shopeepay_payments, :sofort_payments, :swish_payments, :tax_reporting_us_1099_k, :tax_reporting_us_1099_misc, :transfers, :treasury, :treasury_evolve, :treasury_fifth_third, :treasury_goldman_sachs, :twint_payments, :us_bank_account_ach_payments, :us_bank_transfer_payments, :zip_payments + end + + class Company < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class AddressKana < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + end + + class AddressKanji < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + end + + class OwnershipDeclaration < Stripe::StripeObject + attr_reader :date, :ip, :user_agent + end + + class Verification < Stripe::StripeObject + class Document < Stripe::StripeObject + attr_reader :back, :details, :details_code, :front + end + attr_reader :document + end + attr_reader :address, :address_kana, :address_kanji, :directors_provided, :executives_provided, :export_license_id, :export_purpose_code, :name, :name_kana, :name_kanji, :owners_provided, :ownership_declaration, :phone, :structure, :tax_id_provided, :tax_id_registrar, :vat_id_provided, :verification + end + + class Controller < Stripe::StripeObject + class Application < Stripe::StripeObject + attr_reader :loss_liable, :onboarding_owner, :pricing_controls + end + + class Dashboard < Stripe::StripeObject + attr_reader :type + end + + class Fees < Stripe::StripeObject + attr_reader :payer + end + + class Losses < Stripe::StripeObject + attr_reader :payments + end + + class StripeDashboard < Stripe::StripeObject + attr_reader :type + end + attr_reader :application, :dashboard, :fees, :is_controller, :losses, :requirement_collection, :stripe_dashboard, :type + end + + class FutureRequirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + attr_reader :alternative_fields_due, :original_fields_due + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + end + + class Groups < Stripe::StripeObject + attr_reader :payments_pricing + end + + class Requirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + attr_reader :alternative_fields_due, :original_fields_due + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + end + + class RiskControls < Stripe::StripeObject + class Charges < Stripe::StripeObject + attr_reader :pause_requested + end + + class Payouts < Stripe::StripeObject + attr_reader :pause_requested + end + attr_reader :charges, :payouts + end + + class Settings < Stripe::StripeObject + class BacsDebitPayments < Stripe::StripeObject + attr_reader :display_name, :service_user_number + end + + class BankBcaOnboarding < Stripe::StripeObject + attr_reader :account_holder_name, :business_account_number + end + + class Branding < Stripe::StripeObject + attr_reader :icon, :logo, :primary_color, :secondary_color + end + + class Capital < Stripe::StripeObject + attr_reader :payout_destination, :payout_destination_selector + end + + class CardIssuing < Stripe::StripeObject + class TosAcceptance < Stripe::StripeObject + attr_reader :date, :ip, :user_agent + end + attr_reader :tos_acceptance + end + + class CardPayments < Stripe::StripeObject + class DeclineOn < Stripe::StripeObject + attr_reader :avs_failure, :cvc_failure + end + attr_reader :decline_on, :statement_descriptor_prefix, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji + end + + class Dashboard < Stripe::StripeObject + attr_reader :display_name, :timezone + end + + class Invoices < Stripe::StripeObject + attr_reader :default_account_tax_ids + end + + class Payments < Stripe::StripeObject + attr_reader :statement_descriptor, :statement_descriptor_kana, :statement_descriptor_kanji, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji + end + + class Payouts < Stripe::StripeObject + class Schedule < Stripe::StripeObject + attr_reader :delay_days, :interval, :monthly_anchor, :weekly_anchor + end + attr_reader :debit_negative_balances, :schedule, :statement_descriptor + end + + class SepaDebitPayments < Stripe::StripeObject + attr_reader :creditor_id + end + + class TaxForms < Stripe::StripeObject + attr_reader :consented_to_paperless_delivery + end + + class Treasury < Stripe::StripeObject + class TosAcceptance < Stripe::StripeObject + attr_reader :date, :ip, :user_agent + end + attr_reader :tos_acceptance + end + attr_reader :bacs_debit_payments, :bank_bca_onboarding, :branding, :capital, :card_issuing, :card_payments, :dashboard, :invoices, :payments, :payouts, :sepa_debit_payments, :tax_forms, :treasury + end + + class TosAcceptance < Stripe::StripeObject + attr_reader :date, :ip, :service_agreement, :user_agent + end + # Business information about the account. + attr_reader :business_profile + # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :business_type + # Attribute for field capabilities + attr_reader :capabilities + # Whether the account can process charges. + attr_reader :charges_enabled + # Attribute for field company + attr_reader :company + # Attribute for field controller + attr_reader :controller + # The account's country. + attr_reader :country + # Time at which the account was connected. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + attr_reader :default_currency + # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + attr_reader :details_submitted + # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + attr_reader :email + # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + attr_reader :external_accounts + # Attribute for field future_requirements + attr_reader :future_requirements + # The groups associated with the account. + attr_reader :groups + # Unique identifier for the object. + attr_reader :id + # This is an object representing a person associated with a Stripe account. + # + # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. + # + # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + attr_reader :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Whether the funds in this account can be paid out. + attr_reader :payouts_enabled + # Attribute for field requirements + attr_reader :requirements + # Attribute for field risk_controls + attr_reader :risk_controls + # Options for customizing how the account functions within Stripe. + attr_reader :settings + # Attribute for field tos_acceptance + attr_reader :tos_acceptance + # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + attr_reader :type + # Always true for a deleted object + attr_reader :deleted + # With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. # To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). # @@ -77,8 +307,8 @@ def delete(params = {}, opts = {}) end # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/accounts", params: params, opts: opts) end # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. diff --git a/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb index 49a1bffd5..ff0d0a71f 100644 --- a/lib/stripe/resources/account_link.rb +++ b/lib/stripe/resources/account_link.rb @@ -14,6 +14,15 @@ def self.object_name "account_link" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The timestamp at which this account link will expire. + attr_reader :expires_at + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The URL for the account link. + attr_reader :url + # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/account_links", params: params, opts: opts) diff --git a/lib/stripe/resources/account_notice.rb b/lib/stripe/resources/account_notice.rb index 5e157e101..2b7b0324d 100644 --- a/lib/stripe/resources/account_notice.rb +++ b/lib/stripe/resources/account_notice.rb @@ -14,9 +14,37 @@ def self.object_name "account_notice" end + class Email < Stripe::StripeObject + attr_reader :plain_text, :recipient, :subject + end + + class LinkedObjects < Stripe::StripeObject + attr_reader :capability, :issuing_credit_underwriting_record, :issuing_dispute + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # When present, the deadline for sending the notice to meet the relevant regulations. + attr_reader :deadline + # Information about the email when sent. + attr_reader :email + # Unique identifier for the object. + attr_reader :id + # Information about objects related to the notice. + attr_reader :linked_objects + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. + attr_reader :reason + # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. + attr_reader :sent_at + # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/account_notices", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/account_notices", params: params, opts: opts) end # Updates an AccountNotice object. diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index 847edd7d2..f01411839 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -17,6 +17,109 @@ def self.object_name "account_session" end + class Components < Stripe::StripeObject + class AccountManagement < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :disable_stripe_user_authentication, :external_account_collection + end + attr_reader :enabled, :features + end + + class AccountOnboarding < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :disable_stripe_user_authentication, :external_account_collection + end + attr_reader :enabled, :features + end + + class Balances < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts + end + attr_reader :enabled, :features + end + + class CapitalFinancing < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + + class CapitalFinancingApplication < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + + class CapitalFinancingPromotion < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + + class Documents < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + + class NotificationBanner < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :disable_stripe_user_authentication, :external_account_collection + end + attr_reader :enabled, :features + end + + class PaymentDetails < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management + end + attr_reader :enabled, :features + end + + class Payments < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management + end + attr_reader :enabled, :features + end + + class Payouts < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts + end + attr_reader :enabled, :features + end + + class PayoutsList < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + + class TaxRegistrations < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + + class TaxSettings < Stripe::StripeObject + class Features < Stripe::StripeObject; end + attr_reader :enabled, :features + end + attr_reader :account_management, :account_onboarding, :balances, :capital_financing, :capital_financing_application, :capital_financing_promotion, :documents, :notification_banner, :payment_details, :payments, :payouts, :payouts_list, :tax_registrations, :tax_settings + end + # The ID of the account the AccountSession was created for + attr_reader :account + # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. + # + # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. + # + # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + attr_reader :client_secret + # Attribute for field components + attr_reader :components + # The timestamp at which this AccountSession will expire. + attr_reader :expires_at + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/account_sessions", params: params, opts: opts) diff --git a/lib/stripe/resources/apple_pay_domain.rb b/lib/stripe/resources/apple_pay_domain.rb index 2ac3d9389..269825d33 100644 --- a/lib/stripe/resources/apple_pay_domain.rb +++ b/lib/stripe/resources/apple_pay_domain.rb @@ -13,6 +13,19 @@ def self.object_name "apple_pay_domain" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Attribute for field domain_name + attr_reader :domain_name + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Always true for a deleted object + attr_reader :deleted + # Create an apple pay domain. def self.create(params = {}, opts = {}) request_stripe_object( @@ -44,13 +57,8 @@ def delete(params = {}, opts = {}) end # List apple pay domains. - def self.list(filters = {}, opts = {}) - request_stripe_object( - method: :get, - path: "/v1/apple_pay/domains", - params: filters, - opts: opts - ) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/apple_pay/domains", params: params, opts: opts) end def self.resource_url diff --git a/lib/stripe/resources/application_fee.rb b/lib/stripe/resources/application_fee.rb index ed31b569a..cce00b42c 100644 --- a/lib/stripe/resources/application_fee.rb +++ b/lib/stripe/resources/application_fee.rb @@ -13,9 +13,43 @@ def self.object_name nested_resource_class_methods :refund, operations: %i[create retrieve update list] + class FeeSource < Stripe::StripeObject + attr_reader :charge, :payout, :type + end + # ID of the Stripe account this fee was taken from. + attr_reader :account + # Amount earned, in cents (or local equivalent). + attr_reader :amount + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + attr_reader :amount_refunded + # ID of the Connect application that earned the fee. + attr_reader :application + # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + attr_reader :balance_transaction + # ID of the charge that the application fee was taken from. + attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + attr_reader :fee_source + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + attr_reader :originating_transaction + # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + attr_reader :refunded + # A list of refunds that have been applied to the fee. + attr_reader :refunds + # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/application_fees", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/application_fee_refund.rb b/lib/stripe/resources/application_fee_refund.rb index 45dba49f3..1878dd6f5 100644 --- a/lib/stripe/resources/application_fee_refund.rb +++ b/lib/stripe/resources/application_fee_refund.rb @@ -15,6 +15,23 @@ def self.object_name "fee_refund" end + # Amount, in cents (or local equivalent). + attr_reader :amount + # Balance transaction that describes the impact on your account balance. + attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the application fee that was refunded. + attr_reader :fee + # Unique identifier for the object. + attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + def resource_url "#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \ "/#{CGI.escape(id)}" diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb index c670aa707..d0e99da1c 100644 --- a/lib/stripe/resources/apps/secret.rb +++ b/lib/stripe/resources/apps/secret.rb @@ -21,6 +21,28 @@ def self.object_name "apps.secret" end + class Scope < Stripe::StripeObject + attr_reader :type, :user + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # If true, indicates that this secret has been deleted + attr_reader :deleted + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + attr_reader :expires_at + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # A name for the secret that's unique within the scope. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The plaintext secret value to be stored. + attr_reader :payload + # Attribute for field scope + attr_reader :scope + # Create or replace a secret in the secret store. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/apps/secrets", params: params, opts: opts) @@ -47,8 +69,8 @@ def self.find(params = {}, opts = {}) end # List all secrets stored on the given scope. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/apps/secrets", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/apps/secrets", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/balance.rb b/lib/stripe/resources/balance.rb index 141c41909..34817c27c 100644 --- a/lib/stripe/resources/balance.rb +++ b/lib/stripe/resources/balance.rb @@ -18,5 +18,64 @@ class Balance < SingletonAPIResource def self.object_name "balance" end + + class Available < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + attr_reader :bank_account, :card, :fpx + end + attr_reader :amount, :currency, :source_types + end + + class ConnectReserved < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + attr_reader :bank_account, :card, :fpx + end + attr_reader :amount, :currency, :source_types + end + + class InstantAvailable < Stripe::StripeObject + class NetAvailable < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + attr_reader :bank_account, :card, :fpx + end + attr_reader :amount, :destination, :source_types + end + + class SourceTypes < Stripe::StripeObject + attr_reader :bank_account, :card, :fpx + end + attr_reader :amount, :currency, :net_available, :source_types + end + + class Issuing < Stripe::StripeObject + class Available < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + attr_reader :bank_account, :card, :fpx + end + attr_reader :amount, :currency, :source_types + end + attr_reader :available + end + + class Pending < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + attr_reader :bank_account, :card, :fpx + end + attr_reader :amount, :currency, :source_types + end + # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + attr_reader :available + # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + attr_reader :connect_reserved + # Funds that you can pay out using Instant Payouts. + attr_reader :instant_available + # Attribute for field issuing + attr_reader :issuing + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + attr_reader :pending end end diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb index 298355256..1d17dca28 100644 --- a/lib/stripe/resources/balance_transaction.rb +++ b/lib/stripe/resources/balance_transaction.rb @@ -14,14 +14,48 @@ def self.object_name "balance_transaction" end + class FeeDetail < Stripe::StripeObject + attr_reader :amount, :application, :currency, :description, :type + end + # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + attr_reader :amount + # The date that the transaction's net funds become available in the Stripe balance. + attr_reader :available_on + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + attr_reader :exchange_rate + # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + attr_reader :fee + # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + attr_reader :fee_details + # Unique identifier for the object. + attr_reader :id + # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + attr_reader :net + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + attr_reader :reporting_category + # This transaction relates to the Stripe object. + attr_reader :source + # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. + attr_reader :status + # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + attr_reader :type + # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. # # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/balance_transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 5f4c17a25..0f7b1d901 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -19,6 +19,62 @@ def self.object_name "bank_account" end + class FutureRequirements < Stripe::StripeObject + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :currently_due, :errors, :past_due, :pending_verification + end + + class Requirements < Stripe::StripeObject + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :currently_due, :errors, :past_due, :pending_verification + end + # The ID of the account that the bank account is associated with. + attr_reader :account + # The name of the person or business that owns the bank account. + attr_reader :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. + attr_reader :account_holder_type + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + attr_reader :account_type + # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + attr_reader :available_payout_methods + # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + attr_reader :bank_name + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + attr_reader :currency + # The ID of the customer that the bank account is associated with. + attr_reader :customer + # Whether this bank account is the default external account for its currency. + attr_reader :default_for_currency + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + attr_reader :future_requirements + # Unique identifier for the object. + attr_reader :id + # The last four digits of the bank account number. + attr_reader :last4 + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Information about the requirements for the bank account, including what information needs to be collected. + attr_reader :requirements + # The routing transit number for the bank account. + attr_reader :routing_number + # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. + # + # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + attr_reader :status + # Always true for a deleted object + attr_reader :deleted + def verify(params = {}, opts = {}) request_stripe_object( method: :post, @@ -81,7 +137,7 @@ def delete(params = {}, opts = {}) ) end - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) raise NotImplementedError, "Bank accounts cannot be listed without a customer ID or an " \ "account ID. List bank accounts using " \ diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb index 90451eb8e..f16c7e13c 100644 --- a/lib/stripe/resources/billing/alert.rb +++ b/lib/stripe/resources/billing/alert.rb @@ -13,6 +13,27 @@ def self.object_name "billing.alert" end + class UsageThreshold < Stripe::StripeObject + class Filter < Stripe::StripeObject + attr_reader :customer, :type + end + attr_reader :filters, :gte, :meter, :recurrence + end + # Defines the type of the alert. + attr_reader :alert_type + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Status of the alert. This can be active, inactive or archived. + attr_reader :status + # Title of the alert. + attr_reader :title + # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + attr_reader :usage_threshold + # Reactivates this alert, allowing it to trigger again. def activate(params = {}, opts = {}) request_stripe_object( @@ -79,8 +100,8 @@ def self.deactivate(id, params = {}, opts = {}) end # Lists billing active and inactive alerts - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/alerts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/alerts", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb index 928967a07..f3684f8dd 100644 --- a/lib/stripe/resources/billing/credit_balance_summary.rb +++ b/lib/stripe/resources/billing/credit_balance_summary.rb @@ -9,6 +9,31 @@ class CreditBalanceSummary < SingletonAPIResource def self.object_name "billing.credit_balance_summary" end + + class Balance < Stripe::StripeObject + class AvailableBalance < Stripe::StripeObject + class Monetary < Stripe::StripeObject + attr_reader :currency, :value + end + attr_reader :monetary, :type + end + + class LedgerBalance < Stripe::StripeObject + class Monetary < Stripe::StripeObject + attr_reader :currency, :value + end + attr_reader :monetary, :type + end + attr_reader :available_balance, :ledger_balance + end + # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + attr_reader :balances + # The customer the balance is for. + attr_reader :customer + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object end end end diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb index 113cb9861..949d9da70 100644 --- a/lib/stripe/resources/billing/credit_balance_transaction.rb +++ b/lib/stripe/resources/billing/credit_balance_transaction.rb @@ -12,12 +12,56 @@ def self.object_name "billing.credit_balance_transaction" end + class Credit < Stripe::StripeObject + class Amount < Stripe::StripeObject + class Monetary < Stripe::StripeObject + attr_reader :currency, :value + end + attr_reader :monetary, :type + end + attr_reader :amount, :type + end + + class Debit < Stripe::StripeObject + class Amount < Stripe::StripeObject + class Monetary < Stripe::StripeObject + attr_reader :currency, :value + end + attr_reader :monetary, :type + end + + class CreditsApplied < Stripe::StripeObject + attr_reader :invoice, :invoice_line_item + end + attr_reader :amount, :credits_applied, :type + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Credit details for this credit balance transaction. Only present if type is `credit`. + attr_reader :credit + # The credit grant associated with this credit balance transaction. + attr_reader :credit_grant + # Debit details for this credit balance transaction. Only present if type is `debit`. + attr_reader :debit + # The effective time of this credit balance transaction. + attr_reader :effective_at + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the test clock this credit balance transaction belongs to. + attr_reader :test_clock + # The type of credit balance transaction (credit or debit). + attr_reader :type + # Retrieve a list of credit balance transactions - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_balance_transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index 43839816a..94ad3c026 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -16,6 +16,50 @@ def self.object_name "billing.credit_grant" end + class Amount < Stripe::StripeObject + class Monetary < Stripe::StripeObject + attr_reader :currency, :value + end + attr_reader :monetary, :type + end + + class ApplicabilityConfig < Stripe::StripeObject + class Scope < Stripe::StripeObject + attr_reader :price_type + end + attr_reader :scope + end + # Attribute for field amount + attr_reader :amount + # Attribute for field applicability_config + attr_reader :applicability_config + # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + attr_reader :category + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # ID of the customer receiving the billing credits. + attr_reader :customer + # The time when the billing credits become effective—when they're eligible for use. + attr_reader :effective_at + # The time when the billing credits expire. If not present, the billing credits don't expire. + attr_reader :expires_at + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # A descriptive name shown in dashboard. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the test clock this credit grant belongs to. + attr_reader :test_clock + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + attr_reader :voided_at + # Creates a credit grant def self.create(params = {}, opts = {}) request_stripe_object( @@ -47,11 +91,11 @@ def self.expire(id, params = {}, opts = {}) end # Retrieve a list of credit grants. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_grants", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb index 6ef7ad9ec..dfd6ec90b 100644 --- a/lib/stripe/resources/billing/meter.rb +++ b/lib/stripe/resources/billing/meter.rb @@ -21,6 +21,48 @@ def self.object_name operations: %i[list], resource_plural: "event_summaries" + class CustomerMapping < Stripe::StripeObject + attr_reader :event_payload_key, :type + end + + class DefaultAggregation < Stripe::StripeObject + attr_reader :formula + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :deactivated_at + end + + class ValueSettings < Stripe::StripeObject + attr_reader :event_payload_key + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Attribute for field customer_mapping + attr_reader :customer_mapping + # Attribute for field default_aggregation + attr_reader :default_aggregation + # The meter's name. + attr_reader :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + attr_reader :event_name + # The time window to pre-aggregate meter events for, if any. + attr_reader :event_time_window + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The meter's status. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # Attribute for field value_settings + attr_reader :value_settings + # Creates a billing meter def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/billing/meters", params: params, opts: opts) @@ -47,8 +89,8 @@ def self.deactivate(id, params = {}, opts = {}) end # Retrieve a list of billing meters. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/meters", params: params, opts: opts) end # Reactivates a billing meter diff --git a/lib/stripe/resources/billing/meter_event.rb b/lib/stripe/resources/billing/meter_event.rb index 53190ce8a..43ebe5782 100644 --- a/lib/stripe/resources/billing/meter_event.rb +++ b/lib/stripe/resources/billing/meter_event.rb @@ -13,6 +13,21 @@ def self.object_name "billing.meter_event" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + # A unique identifier for the event. + attr_reader :identifier + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + attr_reader :payload + # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + attr_reader :timestamp + # Creates a billing meter event def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/billing/meter_event_adjustment.rb b/lib/stripe/resources/billing/meter_event_adjustment.rb index 8cd345852..958c6226f 100644 --- a/lib/stripe/resources/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/billing/meter_event_adjustment.rb @@ -12,6 +12,22 @@ def self.object_name "billing.meter_event_adjustment" end + class Cancel < Stripe::StripeObject + attr_reader :identifier + end + # Specifies which event to cancel. + attr_reader :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The meter event adjustment's status. + attr_reader :status + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_reader :type + # Creates a billing meter event adjustment def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/billing/meter_event_summary.rb b/lib/stripe/resources/billing/meter_event_summary.rb index 0fb71afd5..80bdc489a 100644 --- a/lib/stripe/resources/billing/meter_event_summary.rb +++ b/lib/stripe/resources/billing/meter_event_summary.rb @@ -10,6 +10,21 @@ class MeterEventSummary < APIResource def self.object_name "billing.meter_event_summary" end + + # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + attr_reader :aggregated_value + # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + attr_reader :end_time + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The meter associated with this event summary. + attr_reader :meter + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + attr_reader :start_time end end end diff --git a/lib/stripe/resources/billing_portal/configuration.rb b/lib/stripe/resources/billing_portal/configuration.rb index 0375ab996..12edd1dcf 100644 --- a/lib/stripe/resources/billing_portal/configuration.rb +++ b/lib/stripe/resources/billing_portal/configuration.rb @@ -14,6 +14,76 @@ def self.object_name "billing_portal.configuration" end + class BusinessProfile < Stripe::StripeObject + attr_reader :headline, :privacy_policy_url, :terms_of_service_url + end + + class Features < Stripe::StripeObject + class CustomerUpdate < Stripe::StripeObject + attr_reader :allowed_updates, :enabled + end + + class InvoiceHistory < Stripe::StripeObject + attr_reader :enabled + end + + class PaymentMethodUpdate < Stripe::StripeObject + attr_reader :enabled + end + + class SubscriptionCancel < Stripe::StripeObject + class CancellationReason < Stripe::StripeObject + attr_reader :enabled, :options + end + attr_reader :cancellation_reason, :enabled, :mode, :proration_behavior + end + + class SubscriptionUpdate < Stripe::StripeObject + class Product < Stripe::StripeObject + attr_reader :prices, :product + end + + class ScheduleAtPeriodEnd < Stripe::StripeObject + class Condition < Stripe::StripeObject + attr_reader :type + end + attr_reader :conditions + end + attr_reader :default_allowed_updates, :enabled, :products, :proration_behavior, :schedule_at_period_end + end + attr_reader :customer_update, :invoice_history, :payment_method_update, :subscription_cancel, :subscription_update + end + + class LoginPage < Stripe::StripeObject + attr_reader :enabled, :url + end + # Whether the configuration is active and can be used to create portal sessions. + attr_reader :active + # ID of the Connect Application that created the configuration. + attr_reader :application + # Attribute for field business_profile + attr_reader :business_profile + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + attr_reader :default_return_url + # Attribute for field features + attr_reader :features + # Unique identifier for the object. + attr_reader :id + # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + attr_reader :is_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Attribute for field login_page + attr_reader :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # Creates a configuration that describes the functionality and behavior of a PortalSession def self.create(params = {}, opts = {}) request_stripe_object( @@ -25,11 +95,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of configurations that describe the functionality of the customer portal. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing_portal/configurations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/billing_portal/session.rb b/lib/stripe/resources/billing_portal/session.rb index ec681a385..e8685da57 100644 --- a/lib/stripe/resources/billing_portal/session.rb +++ b/lib/stripe/resources/billing_portal/session.rb @@ -25,6 +25,67 @@ def self.object_name "billing_portal.session" end + class Flow < Stripe::StripeObject + class AfterCompletion < Stripe::StripeObject + class HostedConfirmation < Stripe::StripeObject + attr_reader :custom_message + end + + class Redirect < Stripe::StripeObject + attr_reader :return_url + end + attr_reader :hosted_confirmation, :redirect, :type + end + + class SubscriptionCancel < Stripe::StripeObject + class Retention < Stripe::StripeObject + class CouponOffer < Stripe::StripeObject + attr_reader :coupon + end + attr_reader :coupon_offer, :type + end + attr_reader :retention, :subscription + end + + class SubscriptionUpdate < Stripe::StripeObject + attr_reader :subscription + end + + class SubscriptionUpdateConfirm < Stripe::StripeObject + class Discount < Stripe::StripeObject + attr_reader :coupon, :promotion_code + end + + class Item < Stripe::StripeObject + attr_reader :id, :price, :quantity + end + attr_reader :discounts, :items, :subscription + end + attr_reader :after_completion, :subscription_cancel, :subscription_update, :subscription_update_confirm, :type + end + # The configuration used by this session, describing the features available. + attr_reader :configuration + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The ID of the customer for this session. + attr_reader :customer + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + attr_reader :flow + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + attr_reader :locale + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + attr_reader :on_behalf_of + # The URL to redirect customers to when they click on the portal's link to return to your website. + attr_reader :return_url + # The short-lived URL of the session that gives customers access to the customer portal. + attr_reader :url + # Creates a session of the customer portal. def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb index 9f0cdad4b..6daa7d6df 100644 --- a/lib/stripe/resources/capability.rb +++ b/lib/stripe/resources/capability.rb @@ -13,6 +13,44 @@ def self.object_name "capability" end + class FutureRequirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + attr_reader :alternative_fields_due, :original_fields_due + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + end + + class Requirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + attr_reader :alternative_fields_due, :original_fields_due + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + end + # The account for which the capability enables functionality. + attr_reader :account + # Attribute for field future_requirements + attr_reader :future_requirements + # The identifier for the capability. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Whether the capability has been requested. + attr_reader :requested + # Time at which the capability was requested. Measured in seconds since the Unix epoch. + attr_reader :requested_at + # Attribute for field requirements + attr_reader :requirements + # The status of the capability. + attr_reader :status + def resource_url if !respond_to?(:account) || account.nil? raise NotImplementedError, diff --git a/lib/stripe/resources/capital/financing_offer.rb b/lib/stripe/resources/capital/financing_offer.rb index cd982e08d..adb7b8118 100644 --- a/lib/stripe/resources/capital/financing_offer.rb +++ b/lib/stripe/resources/capital/financing_offer.rb @@ -13,12 +13,57 @@ def self.object_name "capital.financing_offer" end + class AcceptedTerms < Stripe::StripeObject + attr_reader :advance_amount, :currency, :fee_amount, :previous_financing_fee_discount_amount, :withhold_rate + end + + class OfferedTerms < Stripe::StripeObject + attr_reader :advance_amount, :campaign_type, :currency, :fee_amount, :previous_financing_fee_discount_rate, :withhold_rate + end + # This is an object representing the terms of an offer of financing from + # Stripe Capital to a Connected account. This resource represents + # the terms accepted by the Connected account, which may differ from those + # offered. + attr_reader :accepted_terms + # The ID of the merchant associated with this financing object. + attr_reader :account + # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. + attr_reader :charged_off_at + # Time at which the offer was created. Given in seconds since unix epoch. + attr_reader :created + # Time at which the offer expires. Given in seconds since unix epoch. + attr_reader :expires_after + # The type of financing being offered. + attr_reader :financing_type + # A unique identifier for the financing object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The object type: financing_offer. + attr_reader :object + # This is an object representing the terms of an offer of financing from + # Stripe Capital to a Connected account. This resource represents + # both the terms offered to the Connected account. + attr_reader :offered_terms + # Financing product identifier. + attr_reader :product_type + # The ID of the financing offer that replaced this offer. + attr_reader :replacement + # The ID of the financing offer that this offer is a replacement for. + attr_reader :replacement_for + # The current status of the offer. + attr_reader :status + # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). + attr_reader :type + # Retrieves the financing offers available for Connected accounts that belong to your platform. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/capital/financing_offers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/capital/financing_summary.rb b/lib/stripe/resources/capital/financing_summary.rb index 67b61c1dc..187fe30e5 100644 --- a/lib/stripe/resources/capital/financing_summary.rb +++ b/lib/stripe/resources/capital/financing_summary.rb @@ -10,6 +10,23 @@ class FinancingSummary < SingletonAPIResource def self.object_name "capital.financing_summary" end + + class Details < Stripe::StripeObject + class CurrentRepaymentInterval < Stripe::StripeObject + attr_reader :due_at, :paid_amount, :remaining_amount + end + attr_reader :advance_amount, :advance_paid_out_at, :currency, :current_repayment_interval, :fee_amount, :paid_amount, :remaining_amount, :repayments_begin_at, :withhold_rate + end + # Additional information about the financing summary. Describes currency, advance amount, + # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, + # repayment start date, and advance payout date. + attr_reader :details + # The Financing Offer ID this Financing Summary corresponds to + attr_reader :financing_offer + # The object type: financing_summary + attr_reader :object + # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. + attr_reader :status end end end diff --git a/lib/stripe/resources/capital/financing_transaction.rb b/lib/stripe/resources/capital/financing_transaction.rb index df89c1f78..f9ba76518 100644 --- a/lib/stripe/resources/capital/financing_transaction.rb +++ b/lib/stripe/resources/capital/financing_transaction.rb @@ -12,13 +12,42 @@ def self.object_name "capital.financing_transaction" end + class Details < Stripe::StripeObject + class Transaction < Stripe::StripeObject + attr_reader :charge, :treasury_transaction + end + attr_reader :advance_amount, :currency, :fee_amount, :linked_payment, :reason, :reversed_transaction, :total_amount, :transaction + end + # The ID of the merchant associated with this financing transaction. + attr_reader :account + # Time at which the financing transaction was created. Given in seconds since unix epoch. + attr_reader :created_at + # This is an object representing a transaction on a Capital financing offer. + attr_reader :details + # The Capital financing offer for this financing transaction. + attr_reader :financing_offer + # A unique identifier for the financing transaction object. + attr_reader :id + # The Capital transaction object that predates the Financing Transactions API and + # corresponds with the balance transaction that was created as a result of this + # financing transaction. + attr_reader :legacy_balance_transaction_source + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The object type: financing_transaction + attr_reader :object + # The type of the financing transaction. + attr_reader :type + # A human-friendly description of the financing transaction. + attr_reader :user_facing_description + # Returns a list of financing transactions. The transactions are returned in sorted order, # with the most recent transactions appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/capital/financing_transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb index 5f9f3c160..f0ad7c9aa 100644 --- a/lib/stripe/resources/card.rb +++ b/lib/stripe/resources/card.rb @@ -17,6 +17,78 @@ def self.object_name "card" end + class Networks < Stripe::StripeObject + attr_reader :preferred + end + # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :account + # City/District/Suburb/Town/Village. + attr_reader :address_city + # Billing address country, if provided when creating card. + attr_reader :address_country + # Address line 1 (Street address/PO Box/Company name). + attr_reader :address_line1 + # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # Address line 2 (Apartment/Suite/Unit/Building). + attr_reader :address_line2 + # State/County/Province/Region. + attr_reader :address_state + # ZIP or postal code. + attr_reader :address_zip + # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_zip_check + # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + attr_reader :available_payout_methods + # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :currency + # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + attr_reader :customer + # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + attr_reader :cvc_check + # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :default_for_currency + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Unique identifier for the object. + attr_reader :id + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Cardholder name. + attr_reader :name + # Attribute for field networks + attr_reader :networks + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. + attr_reader :status + # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + attr_reader :tokenization_method + # Always true for a deleted object + attr_reader :deleted + def resource_url if respond_to?(:customer) && !customer.nil? && !customer.empty? "#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}" @@ -58,7 +130,7 @@ def delete(params = {}, opts = {}) ) end - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) raise NotImplementedError, "Cards cannot be listed without a customer ID or an account " \ "ID. List cards using `Customer.list_sources(" \ diff --git a/lib/stripe/resources/cash_balance.rb b/lib/stripe/resources/cash_balance.rb index 4f3740584..6f93dca8a 100644 --- a/lib/stripe/resources/cash_balance.rb +++ b/lib/stripe/resources/cash_balance.rb @@ -9,6 +9,20 @@ def self.object_name "cash_balance" end + class Settings < Stripe::StripeObject + attr_reader :reconciliation_mode, :using_merchant_default + end + # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :available + # The ID of the customer whose cash balance this object represents. + attr_reader :customer + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field settings + attr_reader :settings + def resource_url if !respond_to?(:customer) || customer.nil? raise NotImplementedError, diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index 8177b75f6..d2da0bb0b 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -20,6 +20,453 @@ def self.object_name nested_resource_class_methods :refund, operations: %i[retrieve list] + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone + end + + class FraudDetails < Stripe::StripeObject + attr_reader :stripe_report, :user_report + end + + class Level3 < Stripe::StripeObject + class LineItem < Stripe::StripeObject + attr_reader :discount_amount, :product_code, :product_description, :quantity, :tax_amount, :unit_cost + end + attr_reader :customer_reference, :line_items, :merchant_reference, :shipping_address_zip, :shipping_amount, :shipping_from_zip + end + + class Outcome < Stripe::StripeObject + class Rule < Stripe::StripeObject + attr_reader :action, :id, :predicate + end + attr_reader :network_status, :reason, :risk_level, :risk_score, :rule, :seller_message, :type + end + + class PaymentMethodDetails < Stripe::StripeObject + class AchCreditTransfer < Stripe::StripeObject + attr_reader :account_number, :bank_name, :routing_number, :swift_code + end + + class AchDebit < Stripe::StripeObject + attr_reader :account_holder_type, :bank_name, :country, :fingerprint, :last4, :routing_number + end + + class AcssDebit < Stripe::StripeObject + attr_reader :bank_name, :fingerprint, :institution_number, :last4, :mandate, :transit_number + end + + class Affirm < Stripe::StripeObject + attr_reader :transaction_id + end + + class AfterpayClearpay < Stripe::StripeObject + attr_reader :order_id, :reference + end + + class Alipay < Stripe::StripeObject + attr_reader :buyer_id, :fingerprint, :transaction_id + end + + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :bsb_number, :fingerprint, :last4, :mandate + end + + class BacsDebit < Stripe::StripeObject + attr_reader :fingerprint, :last4, :mandate, :sort_code + end + + class Bancontact < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + end + + class Blik < Stripe::StripeObject + attr_reader :buyer_id + end + + class Boleto < Stripe::StripeObject + attr_reader :tax_id + end + + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + end + + class DecrementalAuthorization < Stripe::StripeObject + attr_reader :status + end + + class ExtendedAuthorization < Stripe::StripeObject + attr_reader :status + end + + class IncrementalAuthorization < Stripe::StripeObject + attr_reader :status + end + + class Installments < Stripe::StripeObject + class Plan < Stripe::StripeObject + attr_reader :count, :interval, :type + end + attr_reader :plan + end + + class Multicapture < Stripe::StripeObject + attr_reader :status + end + + class NetworkToken < Stripe::StripeObject + attr_reader :used + end + + class Overcapture < Stripe::StripeObject + attr_reader :maximum_amount_capturable, :status + end + + class ThreeDSecure < Stripe::StripeObject + attr_reader :authentication_flow, :electronic_commerce_indicator, :exemption_indicator, :exemption_indicator_applied, :result, :result_reason, :transaction_id, :version + end + + class Wallet < Stripe::StripeObject + class AmexExpressCheckout < Stripe::StripeObject; end + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + + class Masterpass < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :billing_address, :email, :name, :shipping_address + end + + class SamsungPay < Stripe::StripeObject; end + + class VisaCheckout < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :billing_address, :email, :name, :shipping_address + end + attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + end + attr_reader :amount_authorized, :authorization_code, :brand, :capture_before, :checks, :country, :decremental_authorization, :description, :exp_month, :exp_year, :extended_authorization, :fingerprint, :funding, :iin, :incremental_authorization, :installments, :issuer, :last4, :mandate, :moto, :multicapture, :network, :network_token, :overcapture, :three_d_secure, :wallet + end + + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + attr_reader :stored_at, :type + end + + class Receipt < Stripe::StripeObject + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + end + + class Wallet < Stripe::StripeObject + attr_reader :type + end + attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + end + + class Cashapp < Stripe::StripeObject + attr_reader :buyer_id, :cashtag + end + + class CustomerBalance < Stripe::StripeObject; end + + class Eps < Stripe::StripeObject + attr_reader :bank, :verified_name + end + + class Fpx < Stripe::StripeObject + attr_reader :account_holder_type, :bank, :transaction_id + end + + class Giropay < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :verified_name + end + + class Gopay < Stripe::StripeObject; end + + class Grabpay < Stripe::StripeObject + attr_reader :transaction_id + end + + class IdBankTransfer < Stripe::StripeObject + attr_reader :account_number, :bank, :bank_code, :bank_name, :display_name + end + + class Ideal < Stripe::StripeObject + attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name + end + + class InteracPresent < Stripe::StripeObject + class Receipt < Stripe::StripeObject + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + end + attr_reader :brand, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :issuer, :last4, :network, :network_transaction_id, :preferred_locales, :read_method, :receipt + end + + class KakaoPay < Stripe::StripeObject + attr_reader :buyer_id + end + + class Klarna < Stripe::StripeObject + class PayerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :country + end + attr_reader :address + end + attr_reader :payer_details, :payment_method_category, :preferred_locale + end + + class Konbini < Stripe::StripeObject + class Store < Stripe::StripeObject + attr_reader :chain + end + attr_reader :store + end + + class KrCard < Stripe::StripeObject + attr_reader :brand, :buyer_id, :last4 + end + + class Link < Stripe::StripeObject + attr_reader :country + end + + class MbWay < Stripe::StripeObject; end + + class Mobilepay < Stripe::StripeObject + class Card < Stripe::StripeObject + attr_reader :brand, :country, :exp_month, :exp_year, :last4 + end + attr_reader :card + end + + class Multibanco < Stripe::StripeObject + attr_reader :entity, :reference + end + + class NaverPay < Stripe::StripeObject + attr_reader :buyer_id + end + + class Oxxo < Stripe::StripeObject + attr_reader :number + end + + class P24 < Stripe::StripeObject + attr_reader :bank, :reference, :verified_name + end + + class Payco < Stripe::StripeObject + attr_reader :buyer_id + end + + class Paynow < Stripe::StripeObject + attr_reader :reference + end + + class Paypal < Stripe::StripeObject + class SellerProtection < Stripe::StripeObject + attr_reader :dispute_categories, :status + end + + class Shipping < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class VerifiedAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :payer_email, :payer_id, :payer_name, :seller_protection, :shipping, :transaction_id, :verified_address, :verified_email, :verified_name + end + + class Payto < Stripe::StripeObject + attr_reader :bsb_number, :last4, :mandate, :pay_id + end + + class Pix < Stripe::StripeObject + attr_reader :bank_transaction_id + end + + class Promptpay < Stripe::StripeObject + attr_reader :reference + end + + class Qris < Stripe::StripeObject; end + class Rechnung < Stripe::StripeObject; end + class RevolutPay < Stripe::StripeObject; end + + class SamsungPay < Stripe::StripeObject + attr_reader :buyer_id + end + + class SepaCreditTransfer < Stripe::StripeObject + attr_reader :bank_name, :bic, :iban + end + + class SepaDebit < Stripe::StripeObject + attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate + end + + class Shopeepay < Stripe::StripeObject; end + + class Sofort < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :country, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + end + + class StripeAccount < Stripe::StripeObject; end + + class Swish < Stripe::StripeObject + attr_reader :fingerprint, :payment_reference, :verified_phone_last4 + end + + class Twint < Stripe::StripeObject; end + + class UsBankAccount < Stripe::StripeObject + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :payment_reference, :routing_number + end + + class Wechat < Stripe::StripeObject; end + + class WechatPay < Stripe::StripeObject + attr_reader :fingerprint, :transaction_id + end + + class Zip < Stripe::StripeObject; end + attr_reader :ach_credit_transfer, :ach_debit, :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_credit_transfer, :sepa_debit, :shopeepay, :sofort, :stripe_account, :swish, :twint, :type, :us_bank_account, :wechat, :wechat_pay, :zip + end + + class RadarOptions < Stripe::StripeObject + attr_reader :session + end + + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :destination + end + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + attr_reader :amount_captured + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + attr_reader :amount_refunded + # ID of the Connect application that created the charge. + attr_reader :application + # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + attr_reader :application_fee + # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + attr_reader :application_fee_amount + # Authorization code on the charge. + attr_reader :authorization_code + # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + attr_reader :balance_transaction + # Attribute for field billing_details + attr_reader :billing_details + # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + attr_reader :calculated_statement_descriptor + # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + attr_reader :captured + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the customer this charge is for if one exists. + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Whether the charge has been disputed. + attr_reader :disputed + # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + attr_reader :failure_balance_transaction + # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + attr_reader :failure_code + # Message to user further explaining reason for charge failure if available. + attr_reader :failure_message + # Information on fraud assessments for the charge. + attr_reader :fraud_details + # Unique identifier for the object. + attr_reader :id + # ID of the invoice this charge is for if one exists. + attr_reader :invoice + # Attribute for field level3 + attr_reader :level3 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_reader :on_behalf_of + # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + attr_reader :outcome + # `true` if the charge succeeded, or was successfully authorized for later capture. + attr_reader :paid + # ID of the PaymentIntent associated with this charge, if one exists. + attr_reader :payment_intent + # ID of the payment method used in this charge. + attr_reader :payment_method + # Details about the payment method at the time of the transaction. + attr_reader :payment_method_details + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_reader :radar_options + # This is the email address that the receipt for this charge was sent to. + attr_reader :receipt_email + # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + attr_reader :receipt_number + # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + attr_reader :receipt_url + # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + attr_reader :refunded + # A list of refunds that have been applied to the charge. + attr_reader :refunds + # ID of the review associated with this charge if one exists. + attr_reader :review + # Shipping information for the charge. + attr_reader :shipping + # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. + attr_reader :source + # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + attr_reader :source_transfer + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + attr_reader :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + attr_reader :statement_descriptor_suffix + # The status of the payment is either `succeeded`, `pending`, or `failed`. + attr_reader :status + # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + attr_reader :transfer + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + attr_reader :transfer_data + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_reader :transfer_group + # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. # # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. @@ -56,8 +503,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/charges", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/charges", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index a05371292..dc8954831 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -27,6 +27,498 @@ def self.object_name "checkout.session" end + class AdaptivePricing < Stripe::StripeObject + attr_reader :enabled + end + + class AfterExpiration < Stripe::StripeObject + class Recovery < Stripe::StripeObject + attr_reader :allow_promotion_codes, :enabled, :expires_at, :url + end + attr_reader :recovery + end + + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability, :status + end + + class CollectedInformation < Stripe::StripeObject + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class TaxId < Stripe::StripeObject + attr_reader :type, :value + end + attr_reader :business_name, :email, :phone, :shipping_details, :tax_ids + end + + class Consent < Stripe::StripeObject + attr_reader :promotions, :terms_of_service + end + + class ConsentCollection < Stripe::StripeObject + class PaymentMethodReuseAgreement < Stripe::StripeObject + attr_reader :position + end + attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service + end + + class CurrencyConversion < Stripe::StripeObject + attr_reader :amount_subtotal, :amount_total, :fx_rate, :source_currency + end + + class CustomField < Stripe::StripeObject + class Dropdown < Stripe::StripeObject + class Option < Stripe::StripeObject + attr_reader :label, :value + end + attr_reader :default_value, :options, :value + end + + class Label < Stripe::StripeObject + attr_reader :custom, :type + end + + class Numeric < Stripe::StripeObject + attr_reader :default_value, :maximum_length, :minimum_length, :value + end + + class Text < Stripe::StripeObject + attr_reader :default_value, :maximum_length, :minimum_length, :value + end + attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type + end + + class CustomText < Stripe::StripeObject + class AfterSubmit < Stripe::StripeObject + attr_reader :message + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :message + end + + class Submit < Stripe::StripeObject + attr_reader :message + end + + class TermsOfServiceAcceptance < Stripe::StripeObject + attr_reader :message + end + attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance + end + + class CustomerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class TaxId < Stripe::StripeObject + attr_reader :type, :value + end + attr_reader :address, :email, :name, :phone, :tax_exempt, :tax_ids + end + + class InvoiceCreation < Stripe::StripeObject + class InvoiceData < Stripe::StripeObject + class CustomField < Stripe::StripeObject + attr_reader :name, :value + end + + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + + class RenderingOptions < Stripe::StripeObject + attr_reader :amount_tax_display + end + attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options + end + attr_reader :enabled, :invoice_data + end + + class PaymentMethodConfigurationDetails < Stripe::StripeObject + attr_reader :id, :parent + end + + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type + end + attr_reader :currency, :mandate_options, :setup_future_usage, :verification_method + end + + class Affirm < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class AfterpayClearpay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Alipay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class AmazonPay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class BacsDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options, :setup_future_usage + end + + class Bancontact < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Boleto < Stripe::StripeObject + attr_reader :expires_after_days, :setup_future_usage + end + + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + attr_reader :enabled + end + attr_reader :installments, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_three_d_secure, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji + end + + class Cashapp < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :country + end + attr_reader :eu_bank_transfer, :requested_address_types, :type + end + attr_reader :bank_transfer, :funding_type, :setup_future_usage + end + + class Eps < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Fpx < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Giropay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Grabpay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Ideal < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class KakaoPay < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class Klarna < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Konbini < Stripe::StripeObject + attr_reader :expires_after_days, :setup_future_usage + end + + class KrCard < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class Link < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Mobilepay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Multibanco < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class NaverPay < Stripe::StripeObject + attr_reader :capture_method + end + + class Oxxo < Stripe::StripeObject + attr_reader :expires_after_days, :setup_future_usage + end + + class P24 < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Payco < Stripe::StripeObject + attr_reader :capture_method + end + + class Paynow < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Paypal < Stripe::StripeObject + attr_reader :capture_method, :preferred_locale, :reference, :setup_future_usage, :subsellers + end + + class Payto < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + end + attr_reader :mandate_options, :setup_future_usage + end + + class Pix < Stripe::StripeObject + attr_reader :expires_after_seconds + end + + class RevolutPay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class SamsungPay < Stripe::StripeObject + attr_reader :capture_method + end + + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options, :setup_future_usage + end + + class Sofort < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Swish < Stripe::StripeObject + attr_reader :reference + end + + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :institution + end + + class ManualEntry < Stripe::StripeObject + attr_reader :mode + end + attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + end + attr_reader :financial_connections, :setup_future_usage, :verification_method + end + attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :cashapp, :customer_balance, :eps, :fpx, :giropay, :grabpay, :ideal, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :revolut_pay, :samsung_pay, :sepa_debit, :sofort, :swish, :us_bank_account + end + + class Permissions < Stripe::StripeObject + class Update < Stripe::StripeObject + attr_reader :shipping_details + end + attr_reader :update + end + + class PhoneNumberCollection < Stripe::StripeObject + attr_reader :enabled + end + + class SavedPaymentMethodOptions < Stripe::StripeObject + attr_reader :allow_redisplay_filters, :payment_method_remove, :payment_method_save + end + + class ShippingAddressCollection < Stripe::StripeObject + attr_reader :allowed_countries + end + + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + end + + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class ShippingOption < Stripe::StripeObject + attr_reader :shipping_amount, :shipping_rate + end + + class TaxIdCollection < Stripe::StripeObject + attr_reader :enabled, :required + end + + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :discounts, :taxes + end + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + end + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + attr_reader :adaptive_pricing + # When set, provides configuration for actions to take if this Checkout Session expires. + attr_reader :after_expiration + # Enables user redeemable promotion codes. + attr_reader :allow_promotion_codes + # Total of all items before discounts or taxes are applied. + attr_reader :amount_subtotal + # Total of all items after discounts and taxes are applied. + attr_reader :amount_total + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. + attr_reader :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + attr_reader :cancel_url + # A unique string to reference the Checkout Session. This can be a + # customer ID, a cart ID, or similar, and can be used to reconcile the + # Session with your internal systems. + attr_reader :client_reference_id + # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + attr_reader :client_secret + # Information about the customer collected within the Checkout Session. + attr_reader :collected_information + # Results of `consent_collection` for this session. + attr_reader :consent + # When set, provides configuration for the Checkout Session to gather active consent from customers. + attr_reader :consent_collection + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions + attr_reader :currency_conversion + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_reader :custom_fields + # Attribute for field custom_text + attr_reader :custom_text + # The ID of the customer for this Session. + # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout + # will create a new customer object based on information provided + # during the payment flow unless an existing customer was provided when + # the Session was created. + attr_reader :customer + # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + attr_reader :customer_creation + # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + attr_reader :customer_details + # If provided, this value will be used when the Customer object is created. + # If not provided, customers will be asked to enter their email address. + # Use this parameter to prefill customer data if you already have an email + # on file. To access information about the customer once the payment flow is + # complete, use the `customer` attribute. + attr_reader :customer_email + # The timestamp at which the Checkout Session will expire. + attr_reader :expires_at + # Unique identifier for the object. + attr_reader :id + # ID of the invoice created by the Checkout Session, if it exists. + attr_reader :invoice + # Details on the state of invoice creation for the Checkout Session. + attr_reader :invoice_creation + # The line items purchased by the customer. + attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + attr_reader :locale + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The mode of the Checkout Session. + attr_reader :mode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + attr_reader :payment_intent + # The ID of the Payment Link that created this Session. + attr_reader :payment_link + # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + attr_reader :payment_method_collection + # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + attr_reader :payment_method_configuration_details + # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + attr_reader :payment_method_options + # A list of the types of payment methods (e.g. card) this Checkout + # Session is allowed to accept. + attr_reader :payment_method_types + # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + # You can use this value to decide when to fulfill your customer's order. + attr_reader :payment_status + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + # + # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + attr_reader :permissions + # Attribute for field phone_number_collection + attr_reader :phone_number_collection + # The ID of the original expired Checkout Session that triggered the recovery flow. + attr_reader :recovered_from + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + attr_reader :redirect_on_completion + # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + attr_reader :return_url + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + attr_reader :saved_payment_method_options + # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + attr_reader :setup_intent + # When set, provides configuration for Checkout to collect a shipping address from a customer. + attr_reader :shipping_address_collection + # The details of the customer cost of shipping, including the customer chosen ShippingRate. + attr_reader :shipping_cost + # Shipping information for this Checkout Session. + attr_reader :shipping_details + # The shipping rate options applied to this Session. + attr_reader :shipping_options + # The status of the Checkout Session, one of `open`, `complete`, or `expired`. + attr_reader :status + # Describes the type of transaction being performed by Checkout in order to customize + # relevant text on the page, such as the submit button. `submit_type` can only be + # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + attr_reader :submit_type + # The ID of the subscription for Checkout Sessions in `subscription` mode. + attr_reader :subscription + # The URL the customer will be directed to after the payment or + # subscription creation is successful. + attr_reader :success_url + # Attribute for field tax_id_collection + attr_reader :tax_id_collection + # Tax and discount details for the computed total amount. + attr_reader :total_details + # The UI mode of the Session. Defaults to `hosted`. + attr_reader :ui_mode + # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + # This value is only present when the session is active. + attr_reader :url + # Creates a Session object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -62,11 +554,11 @@ def self.expire(session, params = {}, opts = {}) end # Returns a list of Checkout Sessions. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/checkout/sessions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb index f3b2b113a..a317a59e6 100644 --- a/lib/stripe/resources/climate/order.rb +++ b/lib/stripe/resources/climate/order.rb @@ -15,6 +15,61 @@ def self.object_name "climate.order" end + class Beneficiary < Stripe::StripeObject + attr_reader :public_name + end + + class DeliveryDetail < Stripe::StripeObject + class Location < Stripe::StripeObject + attr_reader :city, :country, :latitude, :longitude, :region + end + attr_reader :delivered_at, :location, :metric_tons, :registry_url, :supplier + end + # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. + attr_reader :amount_fees + # Total amount of the carbon removal in the currency's smallest unit. + attr_reader :amount_subtotal + # Total amount of the order including fees in the currency's smallest unit. + attr_reader :amount_total + # Attribute for field beneficiary + attr_reader :beneficiary + # Time at which the order was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + # Reason for the cancellation of this order. + attr_reader :cancellation_reason + # For delivered orders, a URL to a delivery certificate for the order. + attr_reader :certificate + # Time at which the order was confirmed. Measured in seconds since the Unix epoch. + attr_reader :confirmed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + attr_reader :currency + # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. + attr_reader :delayed_at + # Time at which the order was delivered. Measured in seconds since the Unix epoch. + attr_reader :delivered_at + # Details about the delivery of carbon removal for this order. + attr_reader :delivery_details + # The year this order is expected to be delivered. + attr_reader :expected_delivery_year + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Quantity of carbon removal that is included in this order. + attr_reader :metric_tons + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Unique ID for the Climate `Product` this order is purchasing. + attr_reader :product + # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + attr_reader :product_substituted_at + # The current status of this order. + attr_reader :status + # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe @@ -49,8 +104,8 @@ def self.create(params = {}, opts = {}) # Lists all Climate order objects. The orders are returned sorted by creation date, with the # most recently created orders appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/climate/orders", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/climate/orders", params: params, opts: opts) end # Updates the specified order by setting the values of the parameters passed. diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb index 9df7b0d8f..069f9a25a 100644 --- a/lib/stripe/resources/climate/product.rb +++ b/lib/stripe/resources/climate/product.rb @@ -13,12 +13,36 @@ def self.object_name "climate.product" end + class CurrentPricesPerMetricTon < Stripe::StripeObject + attr_reader :amount_fees, :amount_subtotal, :amount_total + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Current prices for a metric ton of carbon removal in a currency's smallest unit. + attr_reader :current_prices_per_metric_ton + # The year in which the carbon removal is expected to be delivered. + attr_reader :delivery_year + # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings + # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) + # for a list of available carbon removal products. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The quantity of metric tons available for reservation. + attr_reader :metric_tons_available + # The Climate product's name. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The carbon removal suppliers that fulfill orders for this Climate product. + attr_reader :suppliers + # Lists all available Climate product objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/climate/products", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/climate/supplier.rb b/lib/stripe/resources/climate/supplier.rb index 8be95faac..ad1dabd05 100644 --- a/lib/stripe/resources/climate/supplier.rb +++ b/lib/stripe/resources/climate/supplier.rb @@ -12,12 +12,30 @@ def self.object_name "climate.supplier" end + class Location < Stripe::StripeObject + attr_reader :city, :country, :latitude, :longitude, :region + end + # Unique identifier for the object. + attr_reader :id + # Link to a webpage to learn more about the supplier. + attr_reader :info_url + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The locations in which this supplier operates. + attr_reader :locations + # Name of this carbon removal supplier. + attr_reader :name + # String representing the object’s type. Objects of the same type share the same value. + attr_reader :object + # The scientific pathway used for carbon removal. + attr_reader :removal_pathway + # Lists all available Climate supplier objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/climate/suppliers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/confirmation_token.rb b/lib/stripe/resources/confirmation_token.rb index bfda75f71..6166c21e1 100644 --- a/lib/stripe/resources/confirmation_token.rb +++ b/lib/stripe/resources/confirmation_token.rb @@ -15,6 +15,303 @@ def self.object_name "confirmation_token" end + class MandateData < Stripe::StripeObject + class CustomerAcceptance < Stripe::StripeObject + class Online < Stripe::StripeObject + attr_reader :ip_address, :user_agent + end + attr_reader :online, :type + end + attr_reader :customer_acceptance + end + + class PaymentMethodOptions < Stripe::StripeObject + class Card < Stripe::StripeObject + attr_reader :cvc_token + end + attr_reader :card + end + + class PaymentMethodPreview < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number + end + + class Affirm < Stripe::StripeObject; end + class AfterpayClearpay < Stripe::StripeObject; end + class Alipay < Stripe::StripeObject; end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :bsb_number, :fingerprint, :last4 + end + + class BacsDebit < Stripe::StripeObject + attr_reader :fingerprint, :last4, :sort_code + end + + class Bancontact < Stripe::StripeObject; end + + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone + end + + class Blik < Stripe::StripeObject; end + + class Boleto < Stripe::StripeObject + attr_reader :tax_id + end + + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + end + + class GeneratedFrom < Stripe::StripeObject + class PaymentMethodDetails < Stripe::StripeObject + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + attr_reader :stored_at, :type + end + + class Receipt < Stripe::StripeObject + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + end + + class Wallet < Stripe::StripeObject + attr_reader :type + end + attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + end + attr_reader :card_present, :type + end + attr_reader :charge, :payment_method_details, :setup_attempt + end + + class Networks < Stripe::StripeObject + attr_reader :available, :preferred + end + + class ThreeDSecureUsage < Stripe::StripeObject + attr_reader :supported + end + + class Wallet < Stripe::StripeObject + class AmexExpressCheckout < Stripe::StripeObject; end + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + + class Masterpass < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :billing_address, :email, :name, :shipping_address + end + + class SamsungPay < Stripe::StripeObject; end + + class VisaCheckout < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :billing_address, :email, :name, :shipping_address + end + attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + end + attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :three_d_secure_usage, :wallet + end + + class CardPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + attr_reader :available, :preferred + end + + class Offline < Stripe::StripeObject + attr_reader :stored_at, :type + end + + class Wallet < Stripe::StripeObject + attr_reader :type + end + attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet + end + + class Cashapp < Stripe::StripeObject + attr_reader :buyer_id, :cashtag + end + + class CustomerBalance < Stripe::StripeObject; end + + class Eps < Stripe::StripeObject + attr_reader :bank + end + + class Fpx < Stripe::StripeObject + attr_reader :account_holder_type, :bank + end + + class Giropay < Stripe::StripeObject; end + class Gopay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject; end + + class IdBankTransfer < Stripe::StripeObject + attr_reader :bank, :bank_code, :bank_name, :display_name + end + + class Ideal < Stripe::StripeObject + attr_reader :bank, :bic + end + + class InteracPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + attr_reader :available, :preferred + end + attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method + end + + class KakaoPay < Stripe::StripeObject; end + + class Klarna < Stripe::StripeObject + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + attr_reader :dob + end + + class Konbini < Stripe::StripeObject; end + + class KrCard < Stripe::StripeObject + attr_reader :brand, :last4 + end + + class Link < Stripe::StripeObject + attr_reader :email, :persistent_token + end + + class MbWay < Stripe::StripeObject; end + class Mobilepay < Stripe::StripeObject; end + class Multibanco < Stripe::StripeObject; end + + class NaverPay < Stripe::StripeObject + attr_reader :funding + end + + class Oxxo < Stripe::StripeObject; end + + class P24 < Stripe::StripeObject + attr_reader :bank + end + + class Payco < Stripe::StripeObject; end + class Paynow < Stripe::StripeObject; end + + class Paypal < Stripe::StripeObject + attr_reader :fingerprint, :payer_email, :payer_id, :verified_email + end + + class Payto < Stripe::StripeObject + attr_reader :bsb_number, :last4, :pay_id + end + + class Pix < Stripe::StripeObject; end + class Promptpay < Stripe::StripeObject; end + class Qris < Stripe::StripeObject; end + + class Rechnung < Stripe::StripeObject + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + attr_reader :dob + end + + class RevolutPay < Stripe::StripeObject; end + class SamsungPay < Stripe::StripeObject; end + + class SepaDebit < Stripe::StripeObject + class GeneratedFrom < Stripe::StripeObject + attr_reader :charge, :setup_attempt + end + attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 + end + + class Shopeepay < Stripe::StripeObject; end + + class Sofort < Stripe::StripeObject + attr_reader :country + end + + class Swish < Stripe::StripeObject; end + class Twint < Stripe::StripeObject; end + + class UsBankAccount < Stripe::StripeObject + class Networks < Stripe::StripeObject + attr_reader :preferred, :supported + end + + class StatusDetails < Stripe::StripeObject + class Blocked < Stripe::StripeObject + attr_reader :network_code, :reason + end + attr_reader :blocked + end + attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details + end + + class WechatPay < Stripe::StripeObject; end + class Zip < Stripe::StripeObject; end + attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :allow_redisplay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :billing_details, :blik, :boleto, :card, :card_present, :cashapp, :customer, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :type, :us_bank_account, :wechat_pay, :zip + end + + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :name, :phone + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + attr_reader :expires_at + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Data used for generating a Mandate. + attr_reader :mandate_data + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + attr_reader :payment_intent + # Payment-method-specific configuration for this ConfirmationToken. + attr_reader :payment_method_options + # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + attr_reader :payment_method_preview + # Return URL used to confirm the Intent. + attr_reader :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. + # + # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + attr_reader :setup_future_usage + # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + attr_reader :setup_intent + # Shipping information collected on this ConfirmationToken. + attr_reader :shipping + # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + attr_reader :use_stripe_sdk + def test_helpers TestHelpers.new(self) end diff --git a/lib/stripe/resources/country_spec.rb b/lib/stripe/resources/country_spec.rb index 75582f143..fefd143d7 100644 --- a/lib/stripe/resources/country_spec.rb +++ b/lib/stripe/resources/country_spec.rb @@ -16,9 +16,36 @@ def self.object_name "country_spec" end + class VerificationFields < Stripe::StripeObject + class Company < Stripe::StripeObject + attr_reader :additional, :minimum + end + + class Individual < Stripe::StripeObject + attr_reader :additional, :minimum + end + attr_reader :company, :individual + end + # The default currency for this country. This applies to both payment methods and bank accounts. + attr_reader :default_currency + # Unique identifier for the object. Represented as the ISO country code for this country. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Currencies that can be accepted in the specific country (for transfers). + attr_reader :supported_bank_account_currencies + # Currencies that can be accepted in the specified country (for payments). + attr_reader :supported_payment_currencies + # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + attr_reader :supported_payment_methods + # Countries that can accept transfers from the specified country. + attr_reader :supported_transfer_countries + # Attribute for field verification_fields + attr_reader :verification_fields + # Lists all Country Spec objects available in the API. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/country_specs", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/country_specs", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/coupon.rb b/lib/stripe/resources/coupon.rb index 0d83d68b7..c118e8acd 100644 --- a/lib/stripe/resources/coupon.rb +++ b/lib/stripe/resources/coupon.rb @@ -16,6 +16,50 @@ def self.object_name "coupon" end + class AppliesTo < Stripe::StripeObject + attr_reader :products + end + + class CurrencyOptions < Stripe::StripeObject + attr_reader :amount_off + end + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + attr_reader :amount_off + # Attribute for field applies_to + attr_reader :applies_to + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + attr_reader :currency + # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + attr_reader :duration + # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + attr_reader :duration_in_months + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + attr_reader :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Name of the coupon displayed to customers on for instance invoices or receipts. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + attr_reader :percent_off + # Date after which the coupon can no longer be redeemed. + attr_reader :redeem_by + # Number of times this coupon has been applied to a customer. + attr_reader :times_redeemed + # Taking account of the above properties, whether this coupon can still be applied to a customer. + attr_reader :valid + # Always true for a deleted object + attr_reader :deleted + # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. # # A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it. @@ -44,8 +88,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your coupons. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/coupons", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/coupons", params: params, opts: opts) end # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index 25737f796..3e8d3c5c1 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -15,6 +15,97 @@ def self.object_name "credit_note" end + class DiscountAmount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class PretaxCreditAmount < Stripe::StripeObject + attr_reader :amount, :credit_balance_transaction, :discount, :type + end + + class Refund < Stripe::StripeObject + attr_reader :amount_refunded, :refund + end + + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + end + + class TaxAmount < Stripe::StripeObject + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. + attr_reader :amount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the customer. + attr_reader :customer + # Customer balance transaction related to this credit note. + attr_reader :customer_balance_transaction + # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + attr_reader :discount_amount + # The aggregate amounts calculated per discount for all line items. + attr_reader :discount_amounts + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_reader :effective_at + # Unique identifier for the object. + attr_reader :id + # ID of the invoice. + attr_reader :invoice + # Line items that make up the credit note + attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Customer-facing text that appears on the credit note PDF. + attr_reader :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Amount that was credited outside of Stripe. + attr_reader :out_of_band_amount + # The link to download the PDF of the credit note. + attr_reader :pdf + # Attribute for field post_payment_amount + attr_reader :post_payment_amount + # Attribute for field pre_payment_amount + attr_reader :pre_payment_amount + # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + attr_reader :pretax_credit_amounts + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_reader :reason + # Refund related to this credit note. + attr_reader :refund + # Refunds related to this credit note. + attr_reader :refunds + # The details of the cost of shipping, including the ShippingRate applied to the invoice. + attr_reader :shipping_cost + # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + attr_reader :status + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + attr_reader :subtotal + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + attr_reader :subtotal_excluding_tax + # The aggregate amounts calculated per tax rate for all line items. + attr_reader :tax_amounts + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + attr_reader :total + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + attr_reader :total_excluding_tax + # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + attr_reader :type + # The time that the credit note was voided. + attr_reader :voided_at + # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result # in any combination of the following: @@ -34,8 +125,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of credit notes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/credit_notes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/credit_notes", params: params, opts: opts) end # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/credit_note_line_item.rb b/lib/stripe/resources/credit_note_line_item.rb index 8782c90ff..072909b44 100644 --- a/lib/stripe/resources/credit_note_line_item.rb +++ b/lib/stripe/resources/credit_note_line_item.rb @@ -8,5 +8,51 @@ class CreditNoteLineItem < StripeObject def self.object_name "credit_note_line_item" end + + class DiscountAmount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class PretaxCreditAmount < Stripe::StripeObject + attr_reader :amount, :credit_balance_transaction, :discount, :type + end + + class TaxAmount < Stripe::StripeObject + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + end + # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + attr_reader :amount + # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. + attr_reader :amount_excluding_tax + # Description of the item being credited. + attr_reader :description + # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + attr_reader :discount_amount + # The amount of discount calculated per discount for this line item + attr_reader :discount_amounts + # Unique identifier for the object. + attr_reader :id + # ID of the invoice line item being credited + attr_reader :invoice_line_item + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + attr_reader :pretax_credit_amounts + # The number of units of product being credited. + attr_reader :quantity + # The amount of tax calculated per tax rate for this line item + attr_reader :tax_amounts + # The tax rates which apply to the line item. + attr_reader :tax_rates + # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + attr_reader :type + # The cost of each unit of product being credited. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. + attr_reader :unit_amount_excluding_tax end end diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb index 42c5a6b1f..d9f1a16e7 100644 --- a/lib/stripe/resources/customer.rb +++ b/lib/stripe/resources/customer.rb @@ -22,6 +22,99 @@ def self.object_name nested_resource_class_methods :source, operations: %i[create retrieve update delete list] nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list] + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class InvoiceSettings < Stripe::StripeObject + class CustomField < Stripe::StripeObject + attr_reader :name, :value + end + + class RenderingOptions < Stripe::StripeObject + attr_reader :amount_tax_display, :template + end + attr_reader :custom_fields, :default_payment_method, :footer, :rendering_options + end + + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class Tax < Stripe::StripeObject + class Location < Stripe::StripeObject + attr_reader :country, :source, :state + end + attr_reader :automatic_tax, :ip_address, :location + end + # The customer's address. + attr_reader :address + # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + attr_reader :balance + # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + attr_reader :cash_balance + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + attr_reader :currency + # ID of the default payment source for the customer. + # + # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + attr_reader :default_source + # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. + # + # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + # + # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + attr_reader :delinquent + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Describes the current discount active on the customer, if there is one. + attr_reader :discount + # The customer's email address. + attr_reader :email + # Unique identifier for the object. + attr_reader :id + # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + attr_reader :invoice_credit_balance + # The prefix for the customer used to generate unique invoice numbers. + attr_reader :invoice_prefix + # Attribute for field invoice_settings + attr_reader :invoice_settings + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The customer's full name or business name. + attr_reader :name + # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + attr_reader :next_invoice_sequence + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The customer's phone number. + attr_reader :phone + # The customer's preferred locales (languages), ordered by preference. + attr_reader :preferred_locales + # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + attr_reader :shipping + # The customer's payment sources, if any. + attr_reader :sources + # The customer's current subscriptions, if any. + attr_reader :subscriptions + # Attribute for field tax + attr_reader :tax + # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + attr_reader :tax_exempt + # The customer's tax IDs. + attr_reader :tax_ids + # ID of the test clock that this customer belongs to. + attr_reader :test_clock + # Always true for a deleted object + attr_reader :deleted + # Creates a new customer object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/customers", params: params, opts: opts) @@ -92,8 +185,8 @@ def self.delete_discount(customer, params = {}, opts = {}) end # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/customers", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/customers", params: params, opts: opts) end # Returns a list of PaymentMethods for a given Customer diff --git a/lib/stripe/resources/customer_balance_transaction.rb b/lib/stripe/resources/customer_balance_transaction.rb index b72efd039..9ad1d4b98 100644 --- a/lib/stripe/resources/customer_balance_transaction.rb +++ b/lib/stripe/resources/customer_balance_transaction.rb @@ -16,6 +16,33 @@ def self.object_name "customer_balance_transaction" end + # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The ID of the credit note (if any) related to the transaction. + attr_reader :credit_note + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The ID of the customer the transaction belongs to. + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + attr_reader :ending_balance + # Unique identifier for the object. + attr_reader :id + # The ID of the invoice (if any) related to the transaction. + attr_reader :invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + attr_reader :type + def resource_url if !respond_to?(:customer) || customer.nil? raise NotImplementedError, diff --git a/lib/stripe/resources/customer_cash_balance_transaction.rb b/lib/stripe/resources/customer_cash_balance_transaction.rb index 3d072e914..8413107e0 100644 --- a/lib/stripe/resources/customer_cash_balance_transaction.rb +++ b/lib/stripe/resources/customer_cash_balance_transaction.rb @@ -11,5 +11,77 @@ class CustomerCashBalanceTransaction < APIResource def self.object_name "customer_cash_balance_transaction" end + + class AdjustedForOverdraft < Stripe::StripeObject + attr_reader :balance_transaction, :linked_transaction + end + + class AppliedToPayment < Stripe::StripeObject + attr_reader :payment_intent + end + + class Funded < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :bic, :iban_last4, :sender_name + end + + class GbBankTransfer < Stripe::StripeObject + attr_reader :account_number_last4, :sender_name, :sort_code + end + + class JpBankTransfer < Stripe::StripeObject + attr_reader :sender_bank, :sender_branch, :sender_name + end + + class UsBankTransfer < Stripe::StripeObject + attr_reader :network, :sender_name + end + attr_reader :eu_bank_transfer, :gb_bank_transfer, :jp_bank_transfer, :reference, :type, :us_bank_transfer + end + attr_reader :bank_transfer + end + + class RefundedFromPayment < Stripe::StripeObject + attr_reader :refund + end + + class TransferredToBalance < Stripe::StripeObject + attr_reader :balance_transaction + end + + class UnappliedFromPayment < Stripe::StripeObject + attr_reader :payment_intent + end + # Attribute for field adjusted_for_overdraft + attr_reader :adjusted_for_overdraft + # Attribute for field applied_to_payment + attr_reader :applied_to_payment + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The customer whose available cash balance changed as a result of this transaction. + attr_reader :customer + # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :ending_balance + # Attribute for field funded + attr_reader :funded + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + attr_reader :net_amount + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field refunded_from_payment + attr_reader :refunded_from_payment + # Attribute for field transferred_to_balance + attr_reader :transferred_to_balance + # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + attr_reader :type + # Attribute for field unapplied_from_payment + attr_reader :unapplied_from_payment end end diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb index b6af08c28..0d5ba8954 100644 --- a/lib/stripe/resources/customer_session.rb +++ b/lib/stripe/resources/customer_session.rb @@ -16,6 +16,40 @@ def self.object_name "customer_session" end + class Components < Stripe::StripeObject + class BuyButton < Stripe::StripeObject + attr_reader :enabled + end + + class PaymentElement < Stripe::StripeObject + class Features < Stripe::StripeObject + attr_reader :payment_method_allow_redisplay_filters, :payment_method_redisplay, :payment_method_redisplay_limit, :payment_method_remove, :payment_method_save, :payment_method_save_usage + end + attr_reader :enabled, :features + end + + class PricingTable < Stripe::StripeObject + attr_reader :enabled + end + attr_reader :buy_button, :payment_element, :pricing_table + end + # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. + # + # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + attr_reader :client_secret + # Configuration for the components supported by this Customer Session. + attr_reader :components + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The Customer the Customer Session was created for. + attr_reader :customer + # The timestamp at which this Customer Session will expire. + attr_reader :expires_at + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/discount.rb b/lib/stripe/resources/discount.rb index e0278cd3b..4be0398a3 100644 --- a/lib/stripe/resources/discount.rb +++ b/lib/stripe/resources/discount.rb @@ -11,5 +11,34 @@ class Discount < StripeObject def self.object_name "discount" end + + # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + attr_reader :checkout_session + # A coupon contains information about a percent-off or amount-off discount you + # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + attr_reader :coupon + # The ID of the customer associated with this discount. + attr_reader :customer + # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + attr_reader :end + # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + attr_reader :id + # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + attr_reader :invoice + # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + attr_reader :invoice_item + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The promotion code applied to create this discount. + attr_reader :promotion_code + # Date that the coupon was applied. + attr_reader :start + # The subscription that this coupon is applied to, if it is applied to a particular subscription. + attr_reader :subscription + # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + attr_reader :subscription_item + # Always true for a deleted object + attr_reader :deleted end end diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb index ee34198c2..276746eca 100644 --- a/lib/stripe/resources/dispute.rb +++ b/lib/stripe/resources/dispute.rb @@ -16,6 +16,94 @@ def self.object_name "dispute" end + class Evidence < Stripe::StripeObject + class EnhancedEvidence < Stripe::StripeObject + class VisaCompellingEvidence3 < Stripe::StripeObject + class DisputedTransaction < Stripe::StripeObject + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :merchandise_or_services, :product_description, :shipping_address + end + + class PriorUndisputedTransaction < Stripe::StripeObject + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :charge, :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :product_description, :shipping_address + end + attr_reader :disputed_transaction, :prior_undisputed_transactions + end + attr_reader :visa_compelling_evidence_3 + end + attr_reader :access_activity_log, :billing_address, :cancellation_policy, :cancellation_policy_disclosure, :cancellation_rebuttal, :customer_communication, :customer_email_address, :customer_name, :customer_purchase_ip, :customer_signature, :duplicate_charge_documentation, :duplicate_charge_explanation, :duplicate_charge_id, :enhanced_evidence, :product_description, :receipt, :refund_policy, :refund_policy_disclosure, :refund_refusal_explanation, :service_date, :service_documentation, :shipping_address, :shipping_carrier, :shipping_date, :shipping_documentation, :shipping_tracking_number, :uncategorized_file, :uncategorized_text + end + + class EvidenceDetails < Stripe::StripeObject + class EnhancedEligibility < Stripe::StripeObject + class VisaCompellingEvidence3 < Stripe::StripeObject + attr_reader :required_actions, :status + end + attr_reader :visa_compelling_evidence_3 + end + attr_reader :due_by, :enhanced_eligibility, :has_evidence, :past_due, :submission_count + end + + class PaymentMethodDetails < Stripe::StripeObject + class AmazonPay < Stripe::StripeObject + attr_reader :dispute_type + end + + class Card < Stripe::StripeObject + attr_reader :brand, :case_type, :network_reason_code + end + + class Klarna < Stripe::StripeObject + attr_reader :reason_code + end + + class Paypal < Stripe::StripeObject + attr_reader :case_id, :reason_code + end + attr_reader :amazon_pay, :card, :klarna, :paypal, :type + end + # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + attr_reader :amount + # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + attr_reader :balance_transactions + # ID of the charge that's disputed. + attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # List of eligibility types that are included in `enhanced_evidence`. + attr_reader :enhanced_eligibility_types + # Attribute for field evidence + attr_reader :evidence + # Attribute for field evidence_details + attr_reader :evidence_details + # Unique identifier for the object. + attr_reader :id + # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. + attr_reader :is_charge_refundable + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Network-dependent reason code for the dispute. + attr_reader :network_reason_code + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the PaymentIntent that's disputed. + attr_reader :payment_intent + # Attribute for field payment_method_details + attr_reader :payment_method_details + # Reason given by cardholder for 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`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). + attr_reader :reason + # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. + attr_reader :status + # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. # # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible. @@ -41,8 +129,8 @@ def self.close(dispute, params = {}, opts = {}) end # Returns a list of your disputes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/disputes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/disputes", params: params, opts: opts) end # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. diff --git a/lib/stripe/resources/entitlements/active_entitlement.rb b/lib/stripe/resources/entitlements/active_entitlement.rb index 6454e399e..c8627ecd6 100644 --- a/lib/stripe/resources/entitlements/active_entitlement.rb +++ b/lib/stripe/resources/entitlements/active_entitlement.rb @@ -12,12 +12,23 @@ def self.object_name "entitlements.active_entitlement" end + # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + attr_reader :feature + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # A unique key you provide as your own system identifier. This may be up to 80 characters. + attr_reader :lookup_key + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Retrieve a list of active entitlements for a customer - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/entitlements/active_entitlements", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/entitlements/feature.rb b/lib/stripe/resources/entitlements/feature.rb index 722d33a42..4238b0361 100644 --- a/lib/stripe/resources/entitlements/feature.rb +++ b/lib/stripe/resources/entitlements/feature.rb @@ -15,6 +15,21 @@ def self.object_name "entitlements.feature" end + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + attr_reader :active + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # A unique key you provide as your own system identifier. This may be up to 80 characters. + attr_reader :lookup_key + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Creates a feature def self.create(params = {}, opts = {}) request_stripe_object( @@ -26,11 +41,11 @@ def self.create(params = {}, opts = {}) end # Retrieve a list of features - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/entitlements/features", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/ephemeral_key.rb b/lib/stripe/resources/ephemeral_key.rb index c2115b2fa..55ace3a75 100644 --- a/lib/stripe/resources/ephemeral_key.rb +++ b/lib/stripe/resources/ephemeral_key.rb @@ -11,6 +11,19 @@ def self.object_name "ephemeral_key" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Time at which the key will expire. Measured in seconds since the Unix epoch. + attr_reader :expires + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The key's secret. You can use this value to make authorized requests to the Stripe API. + attr_reader :secret + # Invalidates a short-lived API key for a given resource. def self.delete(id, params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index d2628ef5a..3034e487c 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -40,9 +40,53 @@ def self.object_name "event" end + class Data < Stripe::StripeObject + attr_reader :object, :previous_attributes + end + + class Reason < Stripe::StripeObject + class AutomationAction < Stripe::StripeObject + class StripeSendWebhookCustomEvent < Stripe::StripeObject + attr_reader :custom_data + end + attr_reader :stripe_send_webhook_custom_event, :trigger, :type + end + + class Request < Stripe::StripeObject + attr_reader :id, :idempotency_key + end + attr_reader :automation_action, :request, :type + end + + class Request < Stripe::StripeObject + attr_reader :id, :idempotency_key + end + # The connected account that originates the event. + attr_reader :account + # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + attr_reader :api_version + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Attribute for field data + attr_reader :data + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + attr_reader :pending_webhooks + # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. + attr_reader :reason + # Information on the API request that triggers the event. + attr_reader :request + # Description of the event (for example, `invoice.created` or `charge.refunded`). + attr_reader :type + # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/events", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/exchange_rate.rb b/lib/stripe/resources/exchange_rate.rb index b2bc7c3c5..66185d82b 100644 --- a/lib/stripe/resources/exchange_rate.rb +++ b/lib/stripe/resources/exchange_rate.rb @@ -36,9 +36,16 @@ def self.object_name "exchange_rate" end + # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + attr_reader :rates + # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/exchange_rates", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/exchange_rates", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index ced211941..4992db6c8 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -18,6 +18,29 @@ def self.object_name "file" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The file expires and isn't available at this time in epoch seconds. + attr_reader :expires_at + # The suitable name for saving the file to a filesystem. + attr_reader :filename + # Unique identifier for the object. + attr_reader :id + # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + attr_reader :links + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + attr_reader :purpose + # The size of the file object in bytes. + attr_reader :size + # A suitable title for the document. + attr_reader :title + # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). + attr_reader :type + # Use your live secret API key to download the file from this URL. + attr_reader :url + # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. # # All of Stripe's officially supported Client libraries support sending multipart/form-data. @@ -38,8 +61,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/files", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/files", params: params, opts: opts) end # This resource can have two different object names. In latter API diff --git a/lib/stripe/resources/file_link.rb b/lib/stripe/resources/file_link.rb index 1a31bf2eb..5e689f3fc 100644 --- a/lib/stripe/resources/file_link.rb +++ b/lib/stripe/resources/file_link.rb @@ -15,14 +15,33 @@ def self.object_name "file_link" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Returns if the link is already expired. + attr_reader :expired + # Time that the link expires. + attr_reader :expires_at + # The file object this link points to. + attr_reader :file + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The publicly accessible URL to download the file. + attr_reader :url + # Creates a new file link object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/file_links", params: params, opts: opts) end # Returns a list of file links. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/file_links", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/file_links", params: params, opts: opts) end # Updates an existing file link object. Expired links can no longer be updated. diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index 28fe52c06..3b0608f18 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -15,6 +15,90 @@ def self.object_name nested_resource_class_methods :inferred_balance, operations: %i[list] + class AccountHolder < Stripe::StripeObject + attr_reader :account, :customer, :type + end + + class Balance < Stripe::StripeObject + class Cash < Stripe::StripeObject + attr_reader :available + end + + class Credit < Stripe::StripeObject + attr_reader :used + end + attr_reader :as_of, :cash, :credit, :current, :type + end + + class BalanceRefresh < Stripe::StripeObject + attr_reader :last_attempted_at, :next_refresh_available_at, :status + end + + class InferredBalancesRefresh < Stripe::StripeObject + attr_reader :last_attempted_at, :next_refresh_available_at, :status + end + + class OwnershipRefresh < Stripe::StripeObject + attr_reader :last_attempted_at, :next_refresh_available_at, :status + end + + class TransactionRefresh < Stripe::StripeObject + attr_reader :id, :last_attempted_at, :next_refresh_available_at, :status + end + # The account holder that this account belongs to. + attr_reader :account_holder + # The most recent information about the account's balance. + attr_reader :balance + # The state of the most recent attempt to refresh the account balance. + attr_reader :balance_refresh + # The type of the account. Account category is further divided in `subcategory`. + attr_reader :category + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # A human-readable name that has been assigned to this account, either by the account holder or by the institution. + attr_reader :display_name + # Unique identifier for the object. + attr_reader :id + # The state of the most recent attempt to refresh the account's inferred balance history. + attr_reader :inferred_balances_refresh + # The name of the institution that holds this account. + attr_reader :institution_name + # The last 4 digits of the account number. If present, this will be 4 numeric characters. + attr_reader :last4 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The most recent information about the account's owners. + attr_reader :ownership + # The state of the most recent attempt to refresh the account owners. + attr_reader :ownership_refresh + # The list of permissions granted by this account. + attr_reader :permissions + # The status of the link to the account. + attr_reader :status + # If `category` is `cash`, one of: + # + # - `checking` + # - `savings` + # - `other` + # + # If `category` is `credit`, one of: + # + # - `mortgage` + # - `line_of_credit` + # - `credit_card` + # - `other` + # + # If `category` is `investment` or `other`, this will be `other`. + attr_reader :subcategory + # The list of data refresh subscriptions requested on this account. + attr_reader :subscriptions + # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + attr_reader :supported_payment_method_types + # The state of the most recent attempt to refresh the account transactions. + attr_reader :transaction_refresh + # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). def disconnect(params = {}, opts = {}) request_stripe_object( @@ -36,11 +120,11 @@ def self.disconnect(account, params = {}, opts = {}) end # Returns a list of Financial Connections Account objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/accounts", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/financial_connections/account_inferred_balance.rb b/lib/stripe/resources/financial_connections/account_inferred_balance.rb index 5d9f6df5d..25176af79 100644 --- a/lib/stripe/resources/financial_connections/account_inferred_balance.rb +++ b/lib/stripe/resources/financial_connections/account_inferred_balance.rb @@ -9,6 +9,19 @@ class AccountInferredBalance < APIResource def self.object_name "financial_connections.account_inferred_balance" end + + # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. + attr_reader :as_of + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + attr_reader :current + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object end end end diff --git a/lib/stripe/resources/financial_connections/account_owner.rb b/lib/stripe/resources/financial_connections/account_owner.rb index e9251e064..c5ef98197 100644 --- a/lib/stripe/resources/financial_connections/account_owner.rb +++ b/lib/stripe/resources/financial_connections/account_owner.rb @@ -9,6 +9,23 @@ class AccountOwner < StripeObject def self.object_name "financial_connections.account_owner" end + + # The email address of the owner. + attr_reader :email + # Unique identifier for the object. + attr_reader :id + # The full name of the owner. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ownership object that this owner belongs to. + attr_reader :ownership + # The raw phone number of the owner. + attr_reader :phone + # The raw physical address of the owner. + attr_reader :raw_address + # The timestamp of the refresh that updated this owner. + attr_reader :refreshed_at end end end diff --git a/lib/stripe/resources/financial_connections/account_ownership.rb b/lib/stripe/resources/financial_connections/account_ownership.rb index 8e6daa21d..439272e0e 100644 --- a/lib/stripe/resources/financial_connections/account_ownership.rb +++ b/lib/stripe/resources/financial_connections/account_ownership.rb @@ -9,6 +9,15 @@ class AccountOwnership < StripeObject def self.object_name "financial_connections.account_ownership" end + + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # A paginated list of owners for this account. + attr_reader :owners end end end diff --git a/lib/stripe/resources/financial_connections/institution.rb b/lib/stripe/resources/financial_connections/institution.rb index f1e6db2c1..5432ec320 100644 --- a/lib/stripe/resources/financial_connections/institution.rb +++ b/lib/stripe/resources/financial_connections/institution.rb @@ -12,12 +12,47 @@ def self.object_name "financial_connections.institution" end + class Features < Stripe::StripeObject + class Balances < Stripe::StripeObject + attr_reader :supported + end + + class Ownership < Stripe::StripeObject + attr_reader :supported + end + + class PaymentMethod < Stripe::StripeObject + attr_reader :supported + end + + class Transactions < Stripe::StripeObject + attr_reader :supported + end + attr_reader :balances, :ownership, :payment_method, :transactions + end + # Attribute for field features + attr_reader :features + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The name of this institution. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. + attr_reader :routing_numbers + # The status of this institution in the Financial Connections authentication flow. + attr_reader :status + # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. + attr_reader :url + # Returns a list of Financial Connections Institution objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/institutions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/financial_connections/session.rb b/lib/stripe/resources/financial_connections/session.rb index 420d79913..5ceb2036f 100644 --- a/lib/stripe/resources/financial_connections/session.rb +++ b/lib/stripe/resources/financial_connections/session.rb @@ -12,6 +12,55 @@ def self.object_name "financial_connections.session" end + class AccountHolder < Stripe::StripeObject + attr_reader :account, :customer, :type + end + + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :countries, :institution + end + + class Limits < Stripe::StripeObject + attr_reader :accounts + end + + class ManualEntry < Stripe::StripeObject; end + + class StatusDetails < Stripe::StripeObject + class Cancelled < Stripe::StripeObject + attr_reader :reason + end + attr_reader :cancelled + end + # The account holder for whom accounts are collected in this session. + attr_reader :account_holder + # The accounts that were collected as part of this Session. + attr_reader :accounts + # A value that will be passed to the client to launch the authentication flow. + attr_reader :client_secret + # Attribute for field filters + attr_reader :filters + # Unique identifier for the object. + attr_reader :id + # Attribute for field limits + attr_reader :limits + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Attribute for field manual_entry + attr_reader :manual_entry + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Permissions requested for accounts collected during this session. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url + # The current state of the session. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details + # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js. def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb index a198085ab..bebac6d4f 100644 --- a/lib/stripe/resources/financial_connections/transaction.rb +++ b/lib/stripe/resources/financial_connections/transaction.rb @@ -12,12 +12,40 @@ def self.object_name "financial_connections.transaction" end + class StatusTransitions < Stripe::StripeObject + attr_reader :posted_at, :void_at + end + # The ID of the Financial Connections Account this transaction belongs to. + attr_reader :account + # The amount of this transaction, in cents (or local equivalent). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The description of this transaction. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The status of the transaction. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + attr_reader :transacted_at + # The token of the transaction refresh that last updated or created this transaction. + attr_reader :transaction_refresh + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # Returns a list of Financial Connections Transaction objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/forwarding/request.rb b/lib/stripe/resources/forwarding/request.rb index 4a59ed861..da71c975f 100644 --- a/lib/stripe/resources/forwarding/request.rb +++ b/lib/stripe/resources/forwarding/request.rb @@ -28,6 +28,46 @@ def self.object_name "forwarding.request" end + class RequestContext < Stripe::StripeObject + attr_reader :destination_duration, :destination_ip_address + end + + class RequestDetails < Stripe::StripeObject + class Header < Stripe::StripeObject + attr_reader :name, :value + end + attr_reader :body, :headers, :http_method + end + + class ResponseDetails < Stripe::StripeObject + class Header < Stripe::StripeObject + attr_reader :name, :value + end + attr_reader :body, :headers, :status + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + attr_reader :payment_method + # The field kinds to be replaced in the forwarded request. + attr_reader :replacements + # Context about the request from Stripe's servers to the destination endpoint. + attr_reader :request_context + # The request that was sent to the destination endpoint. We redact any sensitive fields. + attr_reader :request_details + # The response that the destination endpoint returned to us. We redact any sensitive fields. + attr_reader :response_details + # The destination URL for the forwarded request. Must be supported by the config. + attr_reader :url + # Creates a ForwardingRequest object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -39,11 +79,11 @@ def self.create(params = {}, opts = {}) end # Lists all ForwardingRequest objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/forwarding/requests", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb index 887917c59..5f4a323bb 100644 --- a/lib/stripe/resources/funding_instructions.rb +++ b/lib/stripe/resources/funding_instructions.rb @@ -13,6 +13,60 @@ def self.object_name "funding_instructions" end + class BankTransfer < Stripe::StripeObject + class FinancialAddress < Stripe::StripeObject + class Aba < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class BankAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number + end + + class Iban < Stripe::StripeObject + attr_reader :account_holder_name, :bic, :country, :iban + end + + class SortCode < Stripe::StripeObject + attr_reader :account_holder_name, :account_number, :sort_code + end + + class Spei < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :clabe + end + + class Swift < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class BankAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code + end + + class Zengin < Stripe::StripeObject + attr_reader :account_holder_name, :account_number, :account_type, :bank_code, :bank_name, :branch_code, :branch_name + end + attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin + end + attr_reader :country, :financial_addresses, :type + end + # Attribute for field bank_transfer + attr_reader :bank_transfer + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The `funding_type` of the returned instructions + attr_reader :funding_type + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + def resource_url if !respond_to?(:customer) || customer.nil? raise NotImplementedError, diff --git a/lib/stripe/resources/gift_cards/card.rb b/lib/stripe/resources/gift_cards/card.rb index 6d238a9e1..6de6e9c2f 100644 --- a/lib/stripe/resources/gift_cards/card.rb +++ b/lib/stripe/resources/gift_cards/card.rb @@ -15,6 +15,43 @@ def self.object_name "gift_cards.card" end + class CreatedBy < Stripe::StripeObject + class Checkout < Stripe::StripeObject + attr_reader :checkout_session, :line_item + end + + class Order < Stripe::StripeObject + attr_reader :line_item, :order + end + + class Payment < Stripe::StripeObject + attr_reader :payment_intent + end + attr_reader :checkout, :order, :payment, :type + end + # Whether this gift card can be used or not. + attr_reader :active + # The amount of funds available for new transactions. + attr_reader :amount_available + # The amount of funds marked as held. + attr_reader :amount_held + # Code used to redeem this gift card. + attr_reader :code + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The related Stripe objects that created this gift card. + attr_reader :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Unique identifier for the object. + attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Transactions on this gift card. + attr_reader :transactions + # Creates a new gift card object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -26,11 +63,11 @@ def self.create(params = {}, opts = {}) end # List gift cards for an account - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/gift_cards/cards", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/gift_cards/transaction.rb b/lib/stripe/resources/gift_cards/transaction.rb index 4f8786a4f..ffde53df6 100644 --- a/lib/stripe/resources/gift_cards/transaction.rb +++ b/lib/stripe/resources/gift_cards/transaction.rb @@ -19,6 +19,45 @@ def self.object_name "gift_cards.transaction" end + class CreatedBy < Stripe::StripeObject + class Checkout < Stripe::StripeObject + attr_reader :checkout_session, :line_item + end + + class Order < Stripe::StripeObject + attr_reader :line_item, :order + end + + class Payment < Stripe::StripeObject + attr_reader :payment_intent + end + attr_reader :checkout, :order, :payment, :type + end + # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. + attr_reader :amount + # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. + attr_reader :confirmed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The related Stripe objects that created this gift card transaction. + attr_reader :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # The gift card that this transaction occurred on + attr_reader :gift_card + # Unique identifier for the object. + attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Status of this transaction, one of `held`, `confirmed`, or `canceled`. + attr_reader :status + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_reader :transfer_group + # Cancel a gift card transaction def cancel(params = {}, opts = {}) request_stripe_object( @@ -70,11 +109,11 @@ def self.create(params = {}, opts = {}) end # List gift card transactions for a gift card - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/gift_cards/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/identity/verification_report.rb b/lib/stripe/resources/identity/verification_report.rb index 854e08c26..f87515e2a 100644 --- a/lib/stripe/resources/identity/verification_report.rb +++ b/lib/stripe/resources/identity/verification_report.rb @@ -22,12 +22,104 @@ def self.object_name "identity.verification_report" end + class Document < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason + end + + class ExpirationDate < Stripe::StripeObject + attr_reader :day, :month, :year + end + + class IssuedDate < Stripe::StripeObject + attr_reader :day, :month, :year + end + attr_reader :address, :dob, :error, :expiration_date, :files, :first_name, :issued_date, :issuing_country, :last_name, :number, :status, :type + end + + class Email < Stripe::StripeObject + class Error < Stripe::StripeObject + attr_reader :code, :reason + end + attr_reader :email, :error, :status + end + + class IdNumber < Stripe::StripeObject + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason + end + attr_reader :dob, :error, :first_name, :id_number, :id_number_type, :last_name, :status + end + + class Options < Stripe::StripeObject + class Document < Stripe::StripeObject + attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie + end + + class IdNumber < Stripe::StripeObject; end + attr_reader :document, :id_number + end + + class Phone < Stripe::StripeObject + class Error < Stripe::StripeObject + attr_reader :code, :reason + end + attr_reader :error, :phone, :status + end + + class Selfie < Stripe::StripeObject + class Error < Stripe::StripeObject + attr_reader :code, :reason + end + attr_reader :document, :error, :selfie, :status + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_reader :client_reference_id + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Result from a document check + attr_reader :document + # Result from a email check + attr_reader :email + # Unique identifier for the object. + attr_reader :id + # Result from an id_number check + attr_reader :id_number + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field options + attr_reader :options + # Result from a phone check + attr_reader :phone + # Result from a selfie check + attr_reader :selfie + # Type of report. + attr_reader :type + # The configuration token of a verification flow from the dashboard. + attr_reader :verification_flow + # ID of the VerificationSession that created this report. + attr_reader :verification_session + # List all verification reports. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/identity/verification_reports", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index 9ba8789b0..6d0563ca6 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -24,6 +24,82 @@ def self.object_name "identity.verification_session" end + class LastError < Stripe::StripeObject + attr_reader :code, :reason + end + + class Options < Stripe::StripeObject + class Document < Stripe::StripeObject + attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie + end + + class Email < Stripe::StripeObject + attr_reader :require_verification + end + + class IdNumber < Stripe::StripeObject; end + + class Phone < Stripe::StripeObject + attr_reader :require_verification + end + attr_reader :document, :email, :id_number, :phone + end + + class ProvidedDetails < Stripe::StripeObject + attr_reader :email, :phone + end + + class Redaction < Stripe::StripeObject + attr_reader :status + end + + class VerifiedOutputs < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + attr_reader :address, :dob, :email, :first_name, :id_number, :id_number_type, :last_name, :phone + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_reader :client_reference_id + # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + attr_reader :client_secret + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # If present, this property tells you the last error encountered when processing the verification. + attr_reader :last_error + # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + attr_reader :last_verification_report + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # A set of options for the session’s verification checks. + attr_reader :options + # Details provided about the user being verified. These details may be shown to the user. + attr_reader :provided_details + # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + attr_reader :redaction + # Token referencing a Customer resource. + attr_reader :related_customer + # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + attr_reader :status + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + attr_reader :type + # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + attr_reader :url + # The configuration token of a verification flow from the dashboard. + attr_reader :verification_flow + # The user’s verified data. + attr_reader :verified_outputs + # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work). # # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel). @@ -65,11 +141,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of VerificationSessions - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/identity/verification_sessions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 1067e7612..e75d379b4 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -50,6 +50,343 @@ def self.object_name nested_resource_class_methods :line, operations: %i[list] nested_resource_class_methods :payment, operations: %i[retrieve list] + class AmountsDue < Stripe::StripeObject + attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status + end + + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability, :status + end + + class CustomField < Stripe::StripeObject + attr_reader :name, :value + end + + class CustomerAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class CustomerShipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class CustomerTaxId < Stripe::StripeObject + attr_reader :type, :value + end + + class FromInvoice < Stripe::StripeObject + attr_reader :action, :invoice + end + + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + + class LastFinalizationError < Stripe::StripeObject + attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + end + + class PaymentSettings < Stripe::StripeObject + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :transaction_type + end + attr_reader :mandate_options, :verification_method + end + + class Bancontact < Stripe::StripeObject + attr_reader :preferred_language + end + + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + attr_reader :enabled + end + attr_reader :installments, :request_three_d_secure + end + + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :country + end + attr_reader :eu_bank_transfer, :type + end + attr_reader :bank_transfer, :funding_type + end + + class IdBankTransfer < Stripe::StripeObject; end + class Konbini < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :institution + end + attr_reader :filters, :permissions, :prefetch + end + attr_reader :financial_connections, :verification_method + end + attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + end + attr_reader :default_mandate, :payment_method_options, :payment_method_types + end + + class Rendering < Stripe::StripeObject + class Pdf < Stripe::StripeObject + attr_reader :page_size + end + attr_reader :amount_tax_display, :pdf, :template, :template_version + end + + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + end + + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at + end + + class SubscriptionDetails < Stripe::StripeObject + class PauseCollection < Stripe::StripeObject + attr_reader :behavior, :resumes_at + end + attr_reader :metadata, :pause_collection + end + + class ThresholdReason < Stripe::StripeObject + class ItemReason < Stripe::StripeObject + attr_reader :line_item_ids, :usage_gte + end + attr_reader :amount_gte, :item_reasons + end + + class TotalDiscountAmount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class TotalMarginAmount < Stripe::StripeObject + attr_reader :amount, :margin + end + + class TotalPretaxCreditAmount < Stripe::StripeObject + attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + end + + class TotalTaxAmount < Stripe::StripeObject + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :destination + end + # The country of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_country + # The public name of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_name + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_reader :account_tax_ids + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + attr_reader :amount_due + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. + attr_reader :amount_overpaid + # The amount, in cents (or local equivalent), that was paid. + attr_reader :amount_paid + # The difference between amount_due and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + attr_reader :amounts_due + # ID of the Connect Application that created the invoice. + attr_reader :application + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + attr_reader :application_fee_amount + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + attr_reader :attempt_count + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + attr_reader :attempted + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + attr_reader :auto_advance + # Attribute for field automatic_tax + attr_reader :automatic_tax + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + attr_reader :automatically_finalizes_at + # Indicates the reason why the invoice was created. + # + # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + # * `subscription_create`: A new subscription was created. + # * `subscription_cycle`: A subscription advanced into a new period. + # * `subscription_threshold`: A subscription reached a billing threshold. + # * `subscription_update`: A subscription was updated. + # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + attr_reader :billing_reason + # ID of the latest charge generated for this invoice, if any. + attr_reader :charge + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + attr_reader :collection_method + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Custom fields displayed on the invoice. + attr_reader :custom_fields + # The ID of the customer who will be billed. + attr_reader :customer + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_address + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_email + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_name + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_phone + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_shipping + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_exempt + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_ids + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + attr_reader :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_reader :default_source + # The tax rates applied to this invoice, if any. + attr_reader :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_reader :description + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + attr_reader :discount + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + attr_reader :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_reader :effective_at + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :ending_balance + # Footer displayed on the invoice. + attr_reader :footer + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + attr_reader :from_invoice + # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :hosted_invoice_url + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + attr_reader :id + # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :invoice_pdf + # Attribute for field issuer + attr_reader :issuer + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + attr_reader :last_finalization_error + # The ID of the most recent non-draft revision of this invoice + attr_reader :latest_revision + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + attr_reader :next_payment_attempt + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_reader :on_behalf_of + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + attr_reader :paid + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + attr_reader :paid_out_of_band + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + attr_reader :payment_intent + # Attribute for field payment_settings + attr_reader :payment_settings + # Payments for this invoice + attr_reader :payments + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_end + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_start + # Total amount of all post-payment credit notes issued for this invoice. + attr_reader :post_payment_credit_notes_amount + # Total amount of all pre-payment credit notes issued for this invoice. + attr_reader :pre_payment_credit_notes_amount + # The quote this invoice was generated from. + attr_reader :quote + # This is the transaction number that appears on email receipts sent for this invoice. + attr_reader :receipt_number + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_reader :rendering + # The details of the cost of shipping, including the ShippingRate applied on the invoice. + attr_reader :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_reader :shipping_details + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + attr_reader :starting_balance + # Extra information about an invoice for the customer's credit card statement. + attr_reader :statement_descriptor + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # The subscription that this invoice was prepared for, if any. + attr_reader :subscription + # Details about the subscription that created this invoice. + attr_reader :subscription_details + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + attr_reader :subscription_proration_date + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + attr_reader :subtotal + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + attr_reader :subtotal_excluding_tax + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + attr_reader :tax + # ID of the test clock this invoice belongs to. + attr_reader :test_clock + # Attribute for field threshold_reason + attr_reader :threshold_reason + # Total after discounts and taxes. + attr_reader :total + # The aggregate amounts calculated per discount across all line items. + attr_reader :total_discount_amounts + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + attr_reader :total_excluding_tax + # The aggregate amounts calculated per margin across all line items. + attr_reader :total_margin_amounts + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + attr_reader :total_pretax_credit_amounts + # The aggregate amounts calculated per tax rate for all line items. + attr_reader :total_tax_amounts + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + attr_reader :transfer_data + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + attr_reader :webhooks_delivered_at + # Always true for a deleted object + attr_reader :deleted + # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. def add_lines(params = {}, opts = {}) request_stripe_object( @@ -212,8 +549,8 @@ def self.finalize_invoice(invoice, params = {}, opts = {}) end # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/invoices", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/invoices", params: params, opts: opts) end # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index 8b11c532e..58644091f 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -24,6 +24,60 @@ def self.object_name "invoiceitem" end + class Period < Stripe::StripeObject + attr_reader :end, :start + end + # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The ID of the customer who will be billed when this invoice item is billed. + attr_reader :customer + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :date + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # If true, discounts will apply to this invoice item. Always false for prorations. + attr_reader :discountable + # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Unique identifier for the object. + attr_reader :id + # The ID of the invoice this invoice item belongs to. + attr_reader :invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + attr_reader :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field period + attr_reader :period + # If the invoice item is a proration, the plan of the subscription that the proration was computed for. + attr_reader :plan + # The price of the invoice item. + attr_reader :price + # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + attr_reader :proration + # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + attr_reader :quantity + # The subscription that this invoice item has been created for, if any. + attr_reader :subscription + # The subscription item that this invoice item has been created for, if any. + attr_reader :subscription_item + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + attr_reader :tax_rates + # ID of the test clock this invoice item belongs to. + attr_reader :test_clock + # Unit amount (in the `currency` specified) of the invoice item. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Always true for a deleted object + attr_reader :deleted + # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/invoiceitems", params: params, opts: opts) @@ -50,8 +104,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/invoiceitems", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/invoiceitems", params: params, opts: opts) end # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index fb3c25ad1..99f75b072 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -13,6 +13,89 @@ def self.object_name "line_item" end + class DiscountAmount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class MarginAmount < Stripe::StripeObject + attr_reader :amount, :margin + end + + class Period < Stripe::StripeObject + attr_reader :end, :start + end + + class PretaxCreditAmount < Stripe::StripeObject + attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + end + + class ProrationDetails < Stripe::StripeObject + class CreditedItems < Stripe::StripeObject + attr_reader :invoice, :invoice_line_items + end + attr_reader :credited_items + end + + class TaxAmount < Stripe::StripeObject + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + end + # The amount, in cents (or local equivalent). + attr_reader :amount + # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. + attr_reader :amount_excluding_tax + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # The amount of discount calculated per discount for this line item. + attr_reader :discount_amounts + # If true, discounts will apply to this line item. Always false for prorations. + attr_reader :discountable + # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Unique identifier for the object. + attr_reader :id + # The ID of the invoice that contains this line item. + attr_reader :invoice + # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. + attr_reader :invoice_item + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The amount of margin calculated per margin for this line item. + attr_reader :margin_amounts + # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. + attr_reader :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field period + attr_reader :period + # The plan of the subscription, if the line item is a subscription or a proration. + attr_reader :plan + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + attr_reader :pretax_credit_amounts + # The price of the line item. + attr_reader :price + # Whether this is a proration. + attr_reader :proration + # Additional details for proration line items + attr_reader :proration_details + # The quantity of the subscription, if the line item is a subscription or a proration. + attr_reader :quantity + # The subscription that the invoice item pertains to, if any. + attr_reader :subscription + # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + attr_reader :subscription_item + # The amount of tax calculated per tax rate for this line item + attr_reader :tax_amounts + # The tax rates which apply to the line item. + attr_reader :tax_rates + # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + attr_reader :type + # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. + attr_reader :unit_amount_excluding_tax + # Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, # so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. diff --git a/lib/stripe/resources/invoice_payment.rb b/lib/stripe/resources/invoice_payment.rb index dd190ea05..a717aebf7 100644 --- a/lib/stripe/resources/invoice_payment.rb +++ b/lib/stripe/resources/invoice_payment.rb @@ -8,5 +8,39 @@ class InvoicePayment < APIResource def self.object_name "invoice_payment" end + + class Payment < Stripe::StripeObject + attr_reader :charge, :payment_intent, :payment_record, :type + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :canceled_at, :paid_at + end + # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. + attr_reader :amount_overpaid + # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + attr_reader :amount_paid + # Amount intended to be paid toward this invoice, in cents (or local equivalent) + attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Unique identifier for the object. + attr_reader :id + # The invoice that was paid. + attr_reader :invoice + # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + attr_reader :is_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field payment + attr_reader :payment + # The status of the payment, one of `open`, `paid`, or `canceled`. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions end end diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb index 0e7990af9..45c782694 100644 --- a/lib/stripe/resources/invoice_rendering_template.rb +++ b/lib/stripe/resources/invoice_rendering_template.rb @@ -12,6 +12,23 @@ def self.object_name "invoice_rendering_template" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # A brief description of the template, hidden from customers + attr_reader :nickname + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The status of the template, one of `active` or `archived`. + attr_reader :status + # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + attr_reader :version + # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. def archive(params = {}, opts = {}) request_stripe_object( @@ -33,11 +50,11 @@ def self.archive(template, params = {}, opts = {}) end # List all templates, ordered by creation date, with the most recently created template appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/invoice_rendering_templates", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index f5cffe924..6a2e4e343 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -18,6 +18,135 @@ def self.object_name "issuing.authorization" end + class AmountDetails < Stripe::StripeObject + attr_reader :atm_fee, :cashback_amount + end + + class Fleet < Stripe::StripeObject + class CardholderPromptData < Stripe::StripeObject + attr_reader :alphanumeric_id, :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number + end + + class ReportedBreakdown < Stripe::StripeObject + class Fuel < Stripe::StripeObject + attr_reader :gross_amount_decimal + end + + class NonFuel < Stripe::StripeObject + attr_reader :gross_amount_decimal + end + + class Tax < Stripe::StripeObject + attr_reader :local_amount_decimal, :national_amount_decimal + end + attr_reader :fuel, :non_fuel, :tax + end + attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type + end + + class FraudChallenge < Stripe::StripeObject + attr_reader :channel, :status, :undeliverable_reason + end + + class Fuel < Stripe::StripeObject + attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal + end + + class MerchantData < Stripe::StripeObject + attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url + end + + class NetworkData < Stripe::StripeObject + attr_reader :acquiring_institution_id, :system_trace_audit_number, :transaction_id + end + + class PendingRequest < Stripe::StripeObject + class AmountDetails < Stripe::StripeObject + attr_reader :atm_fee, :cashback_amount + end + attr_reader :amount, :amount_details, :currency, :is_amount_controllable, :merchant_amount, :merchant_currency, :network_risk_score + end + + class RequestHistory < Stripe::StripeObject + class AmountDetails < Stripe::StripeObject + attr_reader :atm_fee, :cashback_amount + end + attr_reader :amount, :amount_details, :approved, :authorization_code, :created, :currency, :merchant_amount, :merchant_currency, :network_risk_score, :reason, :reason_message, :requested_at + end + + class Treasury < Stripe::StripeObject + attr_reader :received_credits, :received_debits, :transaction + end + + class VerificationData < Stripe::StripeObject + class AuthenticationExemption < Stripe::StripeObject + attr_reader :claimed_by, :type + end + + class ThreeDSecure < Stripe::StripeObject + attr_reader :result + end + attr_reader :address_line1_check, :address_postal_code_check, :authentication_exemption, :cvc_check, :expiry_check, :postal_code, :three_d_secure + end + # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + # Whether the authorization has been approved. + attr_reader :approved + # How the card details were provided. + attr_reader :authorization_method + # List of balance transactions associated with this authorization. + attr_reader :balance_transactions + # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + attr_reader :card + # The cardholder to whom this authorization belongs. + attr_reader :cardholder + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Fleet-specific information for authorizations using Fleet cards. + attr_reader :fleet + # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + attr_reader :fraud_challenges + # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + attr_reader :fuel + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + attr_reader :merchant_amount + # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :merchant_currency + # Attribute for field merchant_data + attr_reader :merchant_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Details about the authorization, such as identifiers, set by the card network. + attr_reader :network_data + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + attr_reader :pending_request + # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + attr_reader :request_history + # The current status of the authorization in its lifecycle. + attr_reader :status + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + attr_reader :token + # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + attr_reader :transactions + # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + attr_reader :treasury + # Attribute for field verification_data + attr_reader :verification_data + # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + attr_reader :verified_by_fraud_challenge + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + attr_reader :wallet + # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). def approve(params = {}, opts = {}) @@ -73,11 +202,11 @@ class << self end # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/authorizations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb index fdf8188be..131622a7c 100644 --- a/lib/stripe/resources/issuing/card.rb +++ b/lib/stripe/resources/issuing/card.rb @@ -14,14 +14,100 @@ def self.object_name "issuing.card" end + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class AddressValidation < Stripe::StripeObject + class NormalizedAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :mode, :normalized_address, :result + end + + class Customs < Stripe::StripeObject + attr_reader :eori_number + end + attr_reader :address, :address_validation, :carrier, :customs, :eta, :name, :phone_number, :require_signature, :service, :status, :tracking_number, :tracking_url, :type + end + + class SpendingControls < Stripe::StripeObject + class SpendingLimit < Stripe::StripeObject + attr_reader :amount, :categories, :interval + end + attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency + end + + class Wallets < Stripe::StripeObject + class ApplePay < Stripe::StripeObject + attr_reader :eligible, :ineligible_reason + end + + class GooglePay < Stripe::StripeObject + attr_reader :eligible, :ineligible_reason + end + attr_reader :apple_pay, :google_pay, :primary_account_identifier + end + # The brand of the card. + attr_reader :brand + # The reason why the card was canceled. + attr_reader :cancellation_reason + # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + # + # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + attr_reader :cardholder + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + attr_reader :currency + # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + attr_reader :cvc + # The expiration month of the card. + attr_reader :exp_month + # The expiration year of the card. + attr_reader :exp_year + # The financial account this card is attached to. + attr_reader :financial_account + # Unique identifier for the object. + attr_reader :id + # The last 4 digits of the card number. + attr_reader :last4 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The personalization design object belonging to this card. + attr_reader :personalization_design + # The latest card that replaces this card, if any. + attr_reader :replaced_by + # The card this card replaces, if any. + attr_reader :replacement_for + # The reason why the previous card needed to be replaced. + attr_reader :replacement_reason + # Where and how the card will be shipped. + attr_reader :shipping + # Attribute for field spending_controls + attr_reader :spending_controls + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + attr_reader :status + # The type of the card. + attr_reader :type + # Information relating to digital wallets (like Apple Pay and Google Pay). + attr_reader :wallets + # Creates an Issuing Card object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts) end # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/issuing/cards", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/issuing/cards", params: params, opts: opts) end # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb index 24ae14410..45edbae33 100644 --- a/lib/stripe/resources/issuing/cardholder.rb +++ b/lib/stripe/resources/issuing/cardholder.rb @@ -16,6 +16,82 @@ def self.object_name "issuing.cardholder" end + class Billing < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address + end + + class Company < Stripe::StripeObject + attr_reader :tax_id_provided + end + + class Individual < Stripe::StripeObject + class CardIssuing < Stripe::StripeObject + class UserTermsAcceptance < Stripe::StripeObject + attr_reader :date, :ip, :user_agent + end + attr_reader :user_terms_acceptance + end + + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + + class Verification < Stripe::StripeObject + class Document < Stripe::StripeObject + attr_reader :back, :front + end + attr_reader :document + end + attr_reader :card_issuing, :dob, :first_name, :last_name, :verification + end + + class Requirements < Stripe::StripeObject + attr_reader :disabled_reason, :past_due + end + + class SpendingControls < Stripe::StripeObject + class SpendingLimit < Stripe::StripeObject + attr_reader :amount, :categories, :interval + end + attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency + end + # Attribute for field billing + attr_reader :billing + # Additional information about a `company` cardholder. + attr_reader :company + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The cardholder's email address. + attr_reader :email + # Unique identifier for the object. + attr_reader :id + # Additional information about an `individual` cardholder. + attr_reader :individual + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The cardholder's name. This will be printed on cards issued to them. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + attr_reader :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + attr_reader :preferred_locales + # Attribute for field requirements + attr_reader :requirements + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_reader :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. + attr_reader :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + attr_reader :type + # Creates a new Issuing Cardholder object that can be issued cards. def self.create(params = {}, opts = {}) request_stripe_object( @@ -27,11 +103,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/cardholders", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/credit_underwriting_record.rb b/lib/stripe/resources/issuing/credit_underwriting_record.rb index 85a6f7db1..3b6c879fe 100644 --- a/lib/stripe/resources/issuing/credit_underwriting_record.rb +++ b/lib/stripe/resources/issuing/credit_underwriting_record.rb @@ -14,6 +14,63 @@ def self.object_name "issuing.credit_underwriting_record" end + class Application < Stripe::StripeObject + attr_reader :application_method, :purpose, :submitted_at + end + + class CreditUser < Stripe::StripeObject + attr_reader :email, :name + end + + class Decision < Stripe::StripeObject + class ApplicationRejected < Stripe::StripeObject + attr_reader :reason_other_explanation, :reasons + end + + class CreditLimitApproved < Stripe::StripeObject + attr_reader :amount, :currency + end + + class CreditLimitDecreased < Stripe::StripeObject + attr_reader :amount, :currency, :reason_other_explanation, :reasons + end + + class CreditLineClosed < Stripe::StripeObject + attr_reader :reason_other_explanation, :reasons + end + attr_reader :application_rejected, :credit_limit_approved, :credit_limit_decreased, :credit_line_closed, :type + end + + class UnderwritingException < Stripe::StripeObject + attr_reader :explanation, :original_decision_type + end + # For decisions triggered by an application, details about the submission. + attr_reader :application + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The event that triggered the underwriting. + attr_reader :created_from + # Attribute for field credit_user + attr_reader :credit_user + # Date when a decision was made. + attr_reader :decided_at + # Details about the decision. + attr_reader :decision + # For underwriting initiated by an application, a decision must be taken 30 days after the submission. + attr_reader :decision_deadline + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + attr_reader :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_reader :underwriting_exception + # Update a CreditUnderwritingRecord object to correct mistakes. def correct(params = {}, opts = {}) request_stripe_object( @@ -55,11 +112,11 @@ def self.create_from_proactive_review(params = {}, opts = {}) end # Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/credit_underwriting_records", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb index 98527d73f..a5fbf3a88 100644 --- a/lib/stripe/resources/issuing/dispute.rb +++ b/lib/stripe/resources/issuing/dispute.rb @@ -16,6 +16,71 @@ def self.object_name "issuing.dispute" end + class Evidence < Stripe::StripeObject + class Canceled < Stripe::StripeObject + attr_reader :additional_documentation, :canceled_at, :cancellation_policy_provided, :cancellation_reason, :expected_at, :explanation, :product_description, :product_type, :return_status, :returned_at + end + + class Duplicate < Stripe::StripeObject + attr_reader :additional_documentation, :card_statement, :cash_receipt, :check_image, :explanation, :original_transaction + end + + class Fraudulent < Stripe::StripeObject + attr_reader :additional_documentation, :explanation + end + + class MerchandiseNotAsDescribed < Stripe::StripeObject + attr_reader :additional_documentation, :explanation, :received_at, :return_description, :return_status, :returned_at + end + + class NoValidAuthorization < Stripe::StripeObject + attr_reader :additional_documentation, :explanation + end + + class NotReceived < Stripe::StripeObject + attr_reader :additional_documentation, :expected_at, :explanation, :product_description, :product_type + end + + class Other < Stripe::StripeObject + attr_reader :additional_documentation, :explanation, :product_description, :product_type + end + + class ServiceNotAsDescribed < Stripe::StripeObject + attr_reader :additional_documentation, :canceled_at, :cancellation_reason, :explanation, :received_at + end + attr_reader :canceled, :duplicate, :fraudulent, :merchandise_not_as_described, :no_valid_authorization, :not_received, :other, :reason, :service_not_as_described + end + + class Treasury < Stripe::StripeObject + attr_reader :debit_reversal, :received_debit + end + # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + attr_reader :amount + # List of balance transactions associated with the dispute. + attr_reader :balance_transactions + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The currency the `transaction` was made in. + attr_reader :currency + # Attribute for field evidence + attr_reader :evidence + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + attr_reader :loss_reason + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Current status of the dispute. + attr_reader :status + # The transaction being disputed. + attr_reader :transaction + # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + attr_reader :treasury + # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. def self.create(params = {}, opts = {}) request_stripe_object( @@ -27,11 +92,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/disputes", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/dispute_settlement_detail.rb b/lib/stripe/resources/issuing/dispute_settlement_detail.rb index e2c94dca9..0ca55005e 100644 --- a/lib/stripe/resources/issuing/dispute_settlement_detail.rb +++ b/lib/stripe/resources/issuing/dispute_settlement_detail.rb @@ -12,12 +12,35 @@ def self.object_name "issuing.dispute_settlement_detail" end + # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + attr_reader :amount + # The card used to make the original transaction. + attr_reader :card + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The ID of the linked dispute. + attr_reader :dispute + # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. + attr_reader :event_type + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] + attr_reader :network + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ID of the linked card network settlement. + attr_reader :settlement + # Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/dispute_settlement_details", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/fraud_liability_debit.rb b/lib/stripe/resources/issuing/fraud_liability_debit.rb index d81d7c61e..b5671ba94 100644 --- a/lib/stripe/resources/issuing/fraud_liability_debit.rb +++ b/lib/stripe/resources/issuing/fraud_liability_debit.rb @@ -12,12 +12,29 @@ def self.object_name "issuing.fraud_liability_debit" end + # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. + attr_reader :amount + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. + attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The ID of the linked dispute. + attr_reader :dispute + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/fraud_liability_debits", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/personalization_design.rb b/lib/stripe/resources/issuing/personalization_design.rb index 37d00f50a..8a31ff369 100644 --- a/lib/stripe/resources/issuing/personalization_design.rb +++ b/lib/stripe/resources/issuing/personalization_design.rb @@ -14,6 +14,44 @@ def self.object_name "issuing.personalization_design" end + class CarrierText < Stripe::StripeObject + attr_reader :footer_body, :footer_title, :header_body, :header_title + end + + class Preferences < Stripe::StripeObject + attr_reader :is_default, :is_platform_default + end + + class RejectionReasons < Stripe::StripeObject + attr_reader :card_logo, :carrier_text + end + # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + attr_reader :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + attr_reader :carrier_text + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + attr_reader :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Friendly display name. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The physical bundle object belonging to this personalization design. + attr_reader :physical_bundle + # Attribute for field preferences + attr_reader :preferences + # Attribute for field rejection_reasons + attr_reader :rejection_reasons + # Whether this personalization design can be used to create cards. + attr_reader :status + # Creates a personalization design object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -25,11 +63,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/personalization_designs", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/physical_bundle.rb b/lib/stripe/resources/issuing/physical_bundle.rb index 890eab761..109e85fee 100644 --- a/lib/stripe/resources/issuing/physical_bundle.rb +++ b/lib/stripe/resources/issuing/physical_bundle.rb @@ -12,12 +12,30 @@ def self.object_name "issuing.physical_bundle" end + class Features < Stripe::StripeObject + attr_reader :card_logo, :carrier_text, :second_line + end + # Attribute for field features + attr_reader :features + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Friendly display name. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Whether this physical bundle can be used to create cards. + attr_reader :status + # Whether this physical bundle is a standard Stripe offering or custom-made for you. + attr_reader :type + # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/physical_bundles", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/token.rb b/lib/stripe/resources/issuing/token.rb index 58bc8916a..d89046e8f 100644 --- a/lib/stripe/resources/issuing/token.rb +++ b/lib/stripe/resources/issuing/token.rb @@ -13,9 +13,55 @@ def self.object_name "issuing.token" end + class NetworkData < Stripe::StripeObject + class Device < Stripe::StripeObject + attr_reader :device_fingerprint, :ip_address, :location, :name, :phone_number, :type + end + + class Mastercard < Stripe::StripeObject + attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_requestor_name + end + + class Visa < Stripe::StripeObject + attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_risk_score + end + + class WalletProvider < Stripe::StripeObject + class CardholderAddress < Stripe::StripeObject + attr_reader :line1, :postal_code + end + attr_reader :account_id, :account_trust_score, :card_number_source, :cardholder_address, :cardholder_name, :device_trust_score, :hashed_account_email_address, :reason_codes, :suggested_decision, :suggested_decision_version + end + attr_reader :device, :mastercard, :type, :visa, :wallet_provider + end + # Card associated with this token. + attr_reader :card + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The hashed ID derived from the device ID from the card network associated with the token. + attr_reader :device_fingerprint + # Unique identifier for the object. + attr_reader :id + # The last four digits of the token. + attr_reader :last4 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The token service provider / card network associated with the token. + attr_reader :network + # Attribute for field network_data + attr_reader :network_data + # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + attr_reader :network_updated_at + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The usage state of the token. + attr_reader :status + # The digital wallet for this token, if one was used. + attr_reader :wallet_provider + # Lists all Issuing Token objects for a given card. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: params, opts: opts) end # Attempts to update the specified Issuing Token object to the status specified. diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index fa11249de..8ddcce5f5 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -17,12 +17,118 @@ def self.object_name "issuing.transaction" end + class AmountDetails < Stripe::StripeObject + attr_reader :atm_fee, :cashback_amount + end + + class MerchantData < Stripe::StripeObject + attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url + end + + class NetworkData < Stripe::StripeObject + attr_reader :authorization_code, :processing_date, :transaction_id + end + + class PurchaseDetails < Stripe::StripeObject + class Fleet < Stripe::StripeObject + class CardholderPromptData < Stripe::StripeObject + attr_reader :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number + end + + class ReportedBreakdown < Stripe::StripeObject + class Fuel < Stripe::StripeObject + attr_reader :gross_amount_decimal + end + + class NonFuel < Stripe::StripeObject + attr_reader :gross_amount_decimal + end + + class Tax < Stripe::StripeObject + attr_reader :local_amount_decimal, :national_amount_decimal + end + attr_reader :fuel, :non_fuel, :tax + end + attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type + end + + class Flight < Stripe::StripeObject + class Segment < Stripe::StripeObject + attr_reader :arrival_airport_code, :carrier, :departure_airport_code, :flight_number, :service_class, :stopover_allowed + end + attr_reader :departure_at, :passenger_name, :refundable, :segments, :travel_agency + end + + class Fuel < Stripe::StripeObject + attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal + end + + class Lodging < Stripe::StripeObject + attr_reader :check_in_at, :nights + end + + class Receipt < Stripe::StripeObject + attr_reader :description, :quantity, :total, :unit_cost + end + attr_reader :fleet, :flight, :fuel, :lodging, :receipt, :reference + end + + class Treasury < Stripe::StripeObject + attr_reader :received_credit, :received_debit + end + # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + # The `Authorization` object that led to this transaction. + attr_reader :authorization + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + attr_reader :balance_transaction + # The card used to make this transaction. + attr_reader :card + # The cardholder to whom this transaction belongs. + attr_reader :cardholder + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # If you've disputed the transaction, the ID of the dispute. + attr_reader :dispute + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + attr_reader :merchant_amount + # The currency with which the merchant is taking payment. + attr_reader :merchant_currency + # Attribute for field merchant_data + attr_reader :merchant_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Details about the transaction, such as processing dates, set by the card network. + attr_reader :network_data + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Additional purchase information that is optionally provided by the merchant. + attr_reader :purchase_details + # Attribute for field settlement + attr_reader :settlement + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + attr_reader :token + # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + attr_reader :treasury + # The nature of the transaction. + attr_reader :type + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + attr_reader :wallet + # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/line_item.rb b/lib/stripe/resources/line_item.rb index 80d71f2ab..ec97ee4f1 100644 --- a/lib/stripe/resources/line_item.rb +++ b/lib/stripe/resources/line_item.rb @@ -8,5 +8,41 @@ class LineItem < APIResource def self.object_name "item" end + + class Discount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + # Total discount amount applied. If no discounts were applied, defaults to 0. + attr_reader :amount_discount + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total after discounts and taxes. + attr_reader :amount_total + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + attr_reader :description + # The discounts applied to the line item. + attr_reader :discounts + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The price used to generate the line item. + attr_reader :price + # The ID of the product for this line item. + # + # This will always be the same as `price.product`. + attr_reader :product + # The quantity of products being purchased. + attr_reader :quantity + # The taxes applied to the line item. + attr_reader :taxes end end diff --git a/lib/stripe/resources/login_link.rb b/lib/stripe/resources/login_link.rb index 813225126..ec3d624ec 100644 --- a/lib/stripe/resources/login_link.rb +++ b/lib/stripe/resources/login_link.rb @@ -9,6 +9,13 @@ def self.object_name "login_link" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The URL for the login link. + attr_reader :url + def self.retrieve(_id, _opts = nil) raise NotImplementedError, "Login links do not have IDs and cannot be retrieved. They can " \ diff --git a/lib/stripe/resources/mandate.rb b/lib/stripe/resources/mandate.rb index 5a3df47f3..c1cca7a8c 100644 --- a/lib/stripe/resources/mandate.rb +++ b/lib/stripe/resources/mandate.rb @@ -8,5 +8,83 @@ class Mandate < APIResource def self.object_name "mandate" end + + class CustomerAcceptance < Stripe::StripeObject + class Offline < Stripe::StripeObject; end + + class Online < Stripe::StripeObject + attr_reader :ip_address, :user_agent + end + attr_reader :accepted_at, :offline, :online, :type + end + + class MultiUse < Stripe::StripeObject; end + + class PaymentMethodDetails < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + attr_reader :default_for, :interval_description, :payment_schedule, :transaction_type + end + + class AmazonPay < Stripe::StripeObject; end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :url + end + + class BacsDebit < Stripe::StripeObject + attr_reader :network_status, :reference, :revocation_reason, :url + end + + class Card < Stripe::StripeObject; end + class Cashapp < Stripe::StripeObject; end + class KakaoPay < Stripe::StripeObject; end + class KrCard < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + + class Paypal < Stripe::StripeObject + attr_reader :billing_agreement_id, :fingerprint, :payer_id, :verified_email + end + + class Payto < Stripe::StripeObject + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + end + + class RevolutPay < Stripe::StripeObject; end + + class SepaDebit < Stripe::StripeObject + attr_reader :reference, :url + end + + class UsBankAccount < Stripe::StripeObject + attr_reader :collection_method + end + attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :card, :cashapp, :kakao_pay, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :type, :us_bank_account + end + + class SingleUse < Stripe::StripeObject + attr_reader :amount, :currency + end + # Attribute for field customer_acceptance + attr_reader :customer_acceptance + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Attribute for field multi_use + attr_reader :multi_use + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) that the mandate is intended for. + attr_reader :on_behalf_of + # ID of the payment method associated with this mandate. + attr_reader :payment_method + # Attribute for field payment_method_details + attr_reader :payment_method_details + # Attribute for field single_use + attr_reader :single_use + # The mandate status indicates whether or not you can use it to initiate a payment. + attr_reader :status + # The type of the mandate. + attr_reader :type end end diff --git a/lib/stripe/resources/margin.rb b/lib/stripe/resources/margin.rb index 36f6cfdff..15c09ab57 100644 --- a/lib/stripe/resources/margin.rb +++ b/lib/stripe/resources/margin.rb @@ -14,14 +14,33 @@ def self.object_name "margin" end + # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. + attr_reader :active + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Name of the margin that's displayed on, for example, invoices. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + attr_reader :percent_off + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/billing/margins", params: params, opts: opts) end # Retrieve a list of your margins. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/margins", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/margins", params: params, opts: opts) end # Update the specified margin object. Certain fields of the margin object are not editable. diff --git a/lib/stripe/resources/order.rb b/lib/stripe/resources/order.rb index e4d5c23f0..c7d2404af 100644 --- a/lib/stripe/resources/order.rb +++ b/lib/stripe/resources/order.rb @@ -17,6 +17,206 @@ def self.object_name "order" end + class AutomaticTax < Stripe::StripeObject + attr_reader :enabled, :status + end + + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone + end + + class Credit < Stripe::StripeObject + class GiftCard < Stripe::StripeObject + attr_reader :card + end + attr_reader :amount, :gift_card, :ineligible_line_items, :type + end + + class Payment < Stripe::StripeObject + class Settings < Stripe::StripeObject + class AutomaticPaymentMethods < Stripe::StripeObject + attr_reader :enabled + end + + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type + end + attr_reader :mandate_options, :setup_future_usage, :verification_method + end + + class AfterpayClearpay < Stripe::StripeObject + attr_reader :capture_method, :reference, :setup_future_usage + end + + class Alipay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Bancontact < Stripe::StripeObject + attr_reader :preferred_language, :setup_future_usage + end + + class Card < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :country + end + attr_reader :eu_bank_transfer, :requested_address_types, :type + end + attr_reader :bank_transfer, :funding_type, :setup_future_usage + end + + class Ideal < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Klarna < Stripe::StripeObject + attr_reader :capture_method, :preferred_locale, :setup_future_usage + end + + class Link < Stripe::StripeObject + attr_reader :capture_method, :persistent_token, :setup_future_usage + end + + class Oxxo < Stripe::StripeObject + attr_reader :expires_after_days, :setup_future_usage + end + + class P24 < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Paypal < Stripe::StripeObject + class LineItem < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :behavior + end + attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount + end + attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers + end + + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options, :setup_future_usage + end + + class Sofort < Stripe::StripeObject + attr_reader :preferred_language, :setup_future_usage + end + + class WechatPay < Stripe::StripeObject + attr_reader :app_id, :client, :setup_future_usage + end + attr_reader :acss_debit, :afterpay_clearpay, :alipay, :bancontact, :card, :customer_balance, :ideal, :klarna, :link, :oxxo, :p24, :paypal, :sepa_debit, :sofort, :wechat_pay + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :destination + end + attr_reader :application_fee_amount, :automatic_payment_methods, :payment_method_options, :payment_method_types, :return_url, :statement_descriptor, :statement_descriptor_suffix, :transfer_data + end + attr_reader :payment_intent, :settings, :status + end + + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + end + + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :name, :phone + end + + class TaxDetails < Stripe::StripeObject + class TaxId < Stripe::StripeObject + attr_reader :type, :value + end + attr_reader :tax_exempt, :tax_ids + end + + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :discounts, :taxes + end + attr_reader :amount_credit, :amount_discount, :amount_shipping, :amount_tax, :breakdown + end + # Attribute for field amount_remaining + attr_reader :amount_remaining + # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + attr_reader :amount_subtotal + # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + attr_reader :amount_total + # ID of the Connect application that created the Order, if any. + attr_reader :application + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Customer billing details associated with the order. + attr_reader :billing_details + # The client secret of this Order. Used for client-side retrieval using a publishable key. + # + # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + # + # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + attr_reader :client_secret + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The credits applied to the Order. At most 10 credits can be applied to an Order. + attr_reader :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The customer which this orders belongs to. + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Unique identifier for the object. + attr_reader :id + # A recent IP address of the purchaser used for tax reporting and tax location inference. + attr_reader :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. + attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field payment + attr_reader :payment + # The details of the customer cost of shipping, including the customer chosen ShippingRate. + attr_reader :shipping_cost + # Customer shipping information associated with the order. + attr_reader :shipping_details + # The overall status of the order. + attr_reader :status + # Attribute for field tax_details + attr_reader :tax_details + # Attribute for field total_details + attr_reader :total_details + # Cancels the order as well as the payment intent if one is attached. def cancel(params = {}, opts = {}) request_stripe_object( @@ -43,8 +243,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/orders", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/orders", params: params, opts: opts) end # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/payment_attempt_record.rb b/lib/stripe/resources/payment_attempt_record.rb index dc97cc8bf..4775e7559 100644 --- a/lib/stripe/resources/payment_attempt_record.rb +++ b/lib/stripe/resources/payment_attempt_record.rb @@ -14,12 +14,85 @@ def self.object_name "payment_attempt_record" end + class AmountCanceled < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountFailed < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountGuaranteed < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountRequested < Stripe::StripeObject + attr_reader :currency, :value + end + + class CustomerDetails < Stripe::StripeObject + attr_reader :customer, :email, :name, :phone + end + + class PaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone + end + + class Custom < Stripe::StripeObject + attr_reader :display_name, :type + end + attr_reader :billing_details, :custom, :payment_method, :type + end + + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :name, :phone + end + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_canceled + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_failed + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_guaranteed + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Customer information for this payment. + attr_reader :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. + attr_reader :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Information about the Payment Method debited for this payment. + attr_reader :payment_method_details + # ID of the Payment Record this Payment Attempt Record belongs to. + attr_reader :payment_record + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + attr_reader :payment_reference + # Shipping information for this payment. + attr_reader :shipping_details + # List all the Payment Attempt Records attached to the specified Payment Record. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_attempt_records", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 627026581..cbc3af903 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -24,6 +24,616 @@ def self.object_name "payment_intent" end + class AmountDetails < Stripe::StripeObject + class Tip < Stripe::StripeObject + attr_reader :amount + end + attr_reader :tip + end + + class AsyncWorkflows < Stripe::StripeObject + class Inputs < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :calculation + end + attr_reader :tax + end + attr_reader :inputs + end + + class AutomaticPaymentMethods < Stripe::StripeObject + attr_reader :allow_redirects, :enabled + end + + class LastPaymentError < Stripe::StripeObject + attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + end + + class NextAction < Stripe::StripeObject + class AlipayHandleRedirect < Stripe::StripeObject + attr_reader :native_data, :native_url, :return_url, :url + end + + class BoletoDisplayDetails < Stripe::StripeObject + attr_reader :expires_at, :hosted_voucher_url, :number, :pdf + end + + class CardAwaitNotification < Stripe::StripeObject + attr_reader :charge_attempt_at, :customer_approval_required + end + + class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject + class QrCode < Stripe::StripeObject + attr_reader :expires_at, :image_url_png, :image_url_svg + end + attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + end + + class DisplayBankTransferInstructions < Stripe::StripeObject + class FinancialAddress < Stripe::StripeObject + class Aba < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class BankAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number + end + + class Iban < Stripe::StripeObject + attr_reader :account_holder_name, :bic, :country, :iban + end + + class SortCode < Stripe::StripeObject + attr_reader :account_holder_name, :account_number, :sort_code + end + + class Spei < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :clabe + end + + class Swift < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class BankAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code + end + + class Zengin < Stripe::StripeObject + attr_reader :account_holder_name, :account_number, :account_type, :bank_code, :bank_name, :branch_code, :branch_name + end + attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin + end + attr_reader :amount_remaining, :currency, :financial_addresses, :hosted_instructions_url, :reference, :type + end + + class KonbiniDisplayDetails < Stripe::StripeObject + class Stores < Stripe::StripeObject + class Familymart < Stripe::StripeObject + attr_reader :confirmation_number, :payment_code + end + + class Lawson < Stripe::StripeObject + attr_reader :confirmation_number, :payment_code + end + + class Ministop < Stripe::StripeObject + attr_reader :confirmation_number, :payment_code + end + + class Seicomart < Stripe::StripeObject + attr_reader :confirmation_number, :payment_code + end + attr_reader :familymart, :lawson, :ministop, :seicomart + end + attr_reader :expires_at, :hosted_voucher_url, :stores + end + + class MultibancoDisplayDetails < Stripe::StripeObject + attr_reader :entity, :expires_at, :hosted_voucher_url, :reference + end + + class OxxoDisplayDetails < Stripe::StripeObject + attr_reader :expires_after, :hosted_voucher_url, :number + end + + class PaynowDisplayQrCode < Stripe::StripeObject + attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg + end + + class PixDisplayQrCode < Stripe::StripeObject + attr_reader :data, :expires_at, :hosted_instructions_url, :image_url_png, :image_url_svg + end + + class PromptpayDisplayQrCode < Stripe::StripeObject + attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg + end + + class RedirectToUrl < Stripe::StripeObject + attr_reader :return_url, :url + end + + class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject + class QrCode < Stripe::StripeObject + attr_reader :data, :image_url_png, :image_url_svg + end + attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + end + + class VerifyWithMicrodeposits < Stripe::StripeObject + attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type + end + + class WechatPayDisplayQrCode < Stripe::StripeObject + attr_reader :data, :hosted_instructions_url, :image_data_url, :image_url_png, :image_url_svg + end + + class WechatPayRedirectToAndroidApp < Stripe::StripeObject + attr_reader :app_id, :nonce_str, :package, :partner_id, :prepay_id, :sign, :timestamp + end + + class WechatPayRedirectToIosApp < Stripe::StripeObject + attr_reader :native_url + end + attr_reader :alipay_handle_redirect, :boleto_display_details, :card_await_notification, :cashapp_handle_redirect_or_display_qr_code, :display_bank_transfer_instructions, :konbini_display_details, :multibanco_display_details, :oxxo_display_details, :paynow_display_qr_code, :pix_display_qr_code, :promptpay_display_qr_code, :redirect_to_url, :swish_handle_redirect_or_display_qr_code, :type, :use_stripe_sdk, :verify_with_microdeposits, :wechat_pay_display_qr_code, :wechat_pay_redirect_to_android_app, :wechat_pay_redirect_to_ios_app + end + + class PaymentDetails < Stripe::StripeObject + class CarRental < Stripe::StripeObject + class Affiliate < Stripe::StripeObject + attr_reader :name + end + + class Delivery < Stripe::StripeObject + class Recipient < Stripe::StripeObject + attr_reader :email, :name, :phone + end + attr_reader :mode, :recipient + end + + class Driver < Stripe::StripeObject + attr_reader :name + end + + class PickupAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ReturnAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :affiliate, :booking_number, :car_class_code, :car_make, :car_model, :company, :customer_service_phone_number, :days_rented, :delivery, :drivers, :extra_charges, :no_show, :pickup_address, :pickup_at, :rate_amount, :rate_interval, :renter_name, :return_address, :return_at, :tax_exempt + end + + class EventDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class Affiliate < Stripe::StripeObject + attr_reader :name + end + + class Delivery < Stripe::StripeObject + class Recipient < Stripe::StripeObject + attr_reader :email, :name, :phone + end + attr_reader :mode, :recipient + end + attr_reader :access_controlled_venue, :address, :affiliate, :company, :delivery, :ends_at, :genre, :name, :starts_at + end + + class Subscription < Stripe::StripeObject + class Affiliate < Stripe::StripeObject + attr_reader :name + end + + class BillingInterval < Stripe::StripeObject + attr_reader :count, :interval + end + attr_reader :affiliate, :auto_renewal, :billing_interval, :ends_at, :name, :starts_at + end + attr_reader :car_rental, :event_details, :subscription + end + + class PaymentMethodConfigurationDetails < Stripe::StripeObject + attr_reader :id, :parent + end + + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type + end + attr_reader :mandate_options, :setup_future_usage, :verification_method + end + + class Affirm < Stripe::StripeObject + attr_reader :capture_method, :preferred_locale, :setup_future_usage + end + + class AfterpayClearpay < Stripe::StripeObject + attr_reader :capture_method, :reference, :setup_future_usage + end + + class Alipay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Alma < Stripe::StripeObject + attr_reader :capture_method + end + + class AmazonPay < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class BacsDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options, :setup_future_usage + end + + class Bancontact < Stripe::StripeObject + attr_reader :preferred_language, :setup_future_usage + end + + class Blik < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Boleto < Stripe::StripeObject + attr_reader :expires_after_days, :setup_future_usage + end + + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + class AvailablePlan < Stripe::StripeObject + attr_reader :count, :interval, :type + end + + class Plan < Stripe::StripeObject + attr_reader :count, :interval, :type + end + attr_reader :available_plans, :enabled, :plan + end + + class MandateOptions < Stripe::StripeObject + attr_reader :amount, :amount_type, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types + end + + class StatementDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :phone + end + attr_reader :capture_method, :installments, :mandate_options, :network, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_three_d_secure, :require_cvc_recollection, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji, :statement_details + end + + class CardPresent < Stripe::StripeObject + class Routing < Stripe::StripeObject + attr_reader :requested_priority + end + attr_reader :request_extended_authorization, :request_incremental_authorization_support, :routing + end + + class Cashapp < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :country + end + attr_reader :eu_bank_transfer, :requested_address_types, :type + end + attr_reader :bank_transfer, :funding_type, :setup_future_usage + end + + class Eps < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Fpx < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Giropay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Gopay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Grabpay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class IdBankTransfer < Stripe::StripeObject + attr_reader :expires_after, :expires_at, :setup_future_usage + end + + class Ideal < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class InteracPresent < Stripe::StripeObject; end + + class KakaoPay < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class Klarna < Stripe::StripeObject + attr_reader :capture_method, :preferred_locale, :setup_future_usage + end + + class Konbini < Stripe::StripeObject + attr_reader :confirmation_number, :expires_after_days, :expires_at, :product_description, :setup_future_usage + end + + class KrCard < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class Link < Stripe::StripeObject + attr_reader :capture_method, :persistent_token, :setup_future_usage + end + + class MbWay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Mobilepay < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class Multibanco < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class NaverPay < Stripe::StripeObject + attr_reader :capture_method + end + + class Oxxo < Stripe::StripeObject + attr_reader :expires_after_days, :setup_future_usage + end + + class P24 < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Payco < Stripe::StripeObject + attr_reader :capture_method + end + + class Paynow < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Paypal < Stripe::StripeObject + class LineItem < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :behavior + end + attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount + end + attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers + end + + class Payto < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose + end + attr_reader :mandate_options, :setup_future_usage + end + + class Pix < Stripe::StripeObject + attr_reader :expires_after_seconds, :expires_at, :setup_future_usage + end + + class Promptpay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Qris < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Rechnung < Stripe::StripeObject; end + + class RevolutPay < Stripe::StripeObject + attr_reader :capture_method, :setup_future_usage + end + + class SamsungPay < Stripe::StripeObject + attr_reader :capture_method + end + + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options, :setup_future_usage + end + + class Shopeepay < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class Sofort < Stripe::StripeObject + attr_reader :preferred_language, :setup_future_usage + end + + class Swish < Stripe::StripeObject + attr_reader :reference, :setup_future_usage + end + + class Twint < Stripe::StripeObject + attr_reader :setup_future_usage + end + + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :institution + end + + class ManualEntry < Stripe::StripeObject + attr_reader :mode + end + attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + end + + class MandateOptions < Stripe::StripeObject + attr_reader :collection_method + end + attr_reader :financial_connections, :mandate_options, :preferred_settlement_speed, :setup_future_usage, :verification_method + end + + class WechatPay < Stripe::StripeObject + attr_reader :app_id, :client, :setup_future_usage + end + + class Zip < Stripe::StripeObject + attr_reader :setup_future_usage + end + attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :us_bank_account, :wechat_pay, :zip + end + + class Processing < Stripe::StripeObject + class Card < Stripe::StripeObject + class CustomerNotification < Stripe::StripeObject + attr_reader :approval_requested, :completes_at + end + attr_reader :customer_notification + end + attr_reader :card, :type + end + + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :destination + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # Amount that can be captured from this PaymentIntent. + attr_reader :amount_capturable + # Attribute for field amount_details + attr_reader :amount_details + # Amount that this PaymentIntent collects. + attr_reader :amount_received + # ID of the Connect application that created the PaymentIntent. + attr_reader :application + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_reader :application_fee_amount + # Attribute for field async_workflows + attr_reader :async_workflows + # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + attr_reader :automatic_payment_methods + # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + attr_reader :cancellation_reason + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + # + # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + # + # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + attr_reader :client_secret + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + attr_reader :confirmation_method + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # ID of the invoice that created this PaymentIntent, if it exists. + attr_reader :invoice + # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + attr_reader :last_payment_error + # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + attr_reader :latest_charge + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + attr_reader :metadata + # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + attr_reader :next_action + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + attr_reader :on_behalf_of + # Attribute for field payment_details + attr_reader :payment_details + # ID of the payment method used in this PaymentIntent. + attr_reader :payment_method + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + attr_reader :payment_method_configuration_details + # Payment-method-specific configuration for this PaymentIntent. + attr_reader :payment_method_options + # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + attr_reader :payment_method_types + # If present, this property tells you about the processing state of the payment. + attr_reader :processing + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_reader :receipt_email + # ID of the review associated with this PaymentIntent, if any. + attr_reader :review + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + attr_reader :secret_key_confirmation + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Shipping information for this PaymentIntent. + attr_reader :shipping + # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + attr_reader :source + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_reader :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_reader :statement_descriptor_suffix + # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + attr_reader :status + # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_reader :transfer_data + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + attr_reader :transfer_group + # Manually reconcile the remaining amount for a customer_balance PaymentIntent. def apply_customer_balance(params = {}, opts = {}) request_stripe_object( @@ -299,8 +909,8 @@ def self.increment_authorization(intent, params = {}, opts = {}) end # Returns a list of PaymentIntents. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_intents", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_intents", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/payment_link.rb b/lib/stripe/resources/payment_link.rb index d01787067..95b093c64 100644 --- a/lib/stripe/resources/payment_link.rb +++ b/lib/stripe/resources/payment_link.rb @@ -17,14 +17,212 @@ def self.object_name "payment_link" end + class AfterCompletion < Stripe::StripeObject + class HostedConfirmation < Stripe::StripeObject + attr_reader :custom_message + end + + class Redirect < Stripe::StripeObject + attr_reader :url + end + attr_reader :hosted_confirmation, :redirect, :type + end + + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability + end + + class ConsentCollection < Stripe::StripeObject + class PaymentMethodReuseAgreement < Stripe::StripeObject + attr_reader :position + end + attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service + end + + class CustomField < Stripe::StripeObject + class Dropdown < Stripe::StripeObject + class Option < Stripe::StripeObject + attr_reader :label, :value + end + attr_reader :options + end + + class Label < Stripe::StripeObject + attr_reader :custom, :type + end + + class Numeric < Stripe::StripeObject + attr_reader :maximum_length, :minimum_length + end + + class Text < Stripe::StripeObject + attr_reader :maximum_length, :minimum_length + end + attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type + end + + class CustomText < Stripe::StripeObject + class AfterSubmit < Stripe::StripeObject + attr_reader :message + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :message + end + + class Submit < Stripe::StripeObject + attr_reader :message + end + + class TermsOfServiceAcceptance < Stripe::StripeObject + attr_reader :message + end + attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance + end + + class InvoiceCreation < Stripe::StripeObject + class InvoiceData < Stripe::StripeObject + class CustomField < Stripe::StripeObject + attr_reader :name, :value + end + + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + + class RenderingOptions < Stripe::StripeObject + attr_reader :amount_tax_display + end + attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options + end + attr_reader :enabled, :invoice_data + end + + class PaymentIntentData < Stripe::StripeObject + attr_reader :capture_method, :description, :metadata, :setup_future_usage, :statement_descriptor, :statement_descriptor_suffix, :transfer_group + end + + class PhoneNumberCollection < Stripe::StripeObject + attr_reader :enabled + end + + class Restrictions < Stripe::StripeObject + class CompletedSessions < Stripe::StripeObject + attr_reader :count, :limit + end + attr_reader :completed_sessions + end + + class ShippingAddressCollection < Stripe::StripeObject + attr_reader :allowed_countries + end + + class ShippingOption < Stripe::StripeObject + attr_reader :shipping_amount, :shipping_rate + end + + class SubscriptionData < Stripe::StripeObject + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :issuer + end + + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + attr_reader :missing_payment_method + end + attr_reader :end_behavior + end + attr_reader :description, :invoice_settings, :metadata, :trial_period_days, :trial_settings + end + + class TaxIdCollection < Stripe::StripeObject + attr_reader :enabled, :required + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :destination + end + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + attr_reader :active + # Attribute for field after_completion + attr_reader :after_completion + # Whether user redeemable promotion codes are enabled. + attr_reader :allow_promotion_codes + # The ID of the Connect application that created the Payment Link. + attr_reader :application + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_reader :application_fee_amount + # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + attr_reader :billing_address_collection + # When set, provides configuration to gather active consent from customers. + attr_reader :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_reader :custom_fields + # Attribute for field custom_text + attr_reader :custom_text + # Configuration for Customer creation during checkout. + attr_reader :customer_creation + # Unique identifier for the object. + attr_reader :id + # The custom message to be displayed to a customer when a payment link is no longer active. + attr_reader :inactive_message + # Configuration for creating invoice for payment mode payment links. + attr_reader :invoice_creation + # The line items representing what is being sold. + attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + attr_reader :on_behalf_of + # Indicates the parameters to be passed to PaymentIntent creation during checkout. + attr_reader :payment_intent_data + # Configuration for collecting a payment method during checkout. Defaults to `always`. + attr_reader :payment_method_collection + # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_reader :payment_method_types + # Attribute for field phone_number_collection + attr_reader :phone_number_collection + # Settings that restrict the usage of a payment link. + attr_reader :restrictions + # Configuration for collecting the customer's shipping address. + attr_reader :shipping_address_collection + # The shipping rate options applied to the session. + attr_reader :shipping_options + # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + attr_reader :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + attr_reader :subscription_data + # Attribute for field tax_id_collection + attr_reader :tax_id_collection + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + attr_reader :transfer_data + # The public URL that can be shared with customers. + attr_reader :url + # Creates a payment link. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/payment_links", params: params, opts: opts) end # Returns a list of your payment links. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_links", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_links", params: params, opts: opts) end # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb index 3415bf08b..3d80244d2 100644 --- a/lib/stripe/resources/payment_method.rb +++ b/lib/stripe/resources/payment_method.rb @@ -17,6 +17,374 @@ def self.object_name "payment_method" end + class AcssDebit < Stripe::StripeObject + attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number + end + + class Affirm < Stripe::StripeObject; end + class AfterpayClearpay < Stripe::StripeObject; end + class Alipay < Stripe::StripeObject; end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :bsb_number, :fingerprint, :last4 + end + + class BacsDebit < Stripe::StripeObject + attr_reader :fingerprint, :last4, :sort_code + end + + class Bancontact < Stripe::StripeObject; end + + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone + end + + class Blik < Stripe::StripeObject; end + + class Boleto < Stripe::StripeObject + attr_reader :tax_id + end + + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + end + + class GeneratedFrom < Stripe::StripeObject + class PaymentMethodDetails < Stripe::StripeObject + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + attr_reader :stored_at, :type + end + + class Receipt < Stripe::StripeObject + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + end + + class Wallet < Stripe::StripeObject + attr_reader :type + end + attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + end + attr_reader :card_present, :type + end + attr_reader :charge, :payment_method_details, :setup_attempt + end + + class Networks < Stripe::StripeObject + attr_reader :available, :preferred + end + + class ThreeDSecureUsage < Stripe::StripeObject + attr_reader :supported + end + + class Wallet < Stripe::StripeObject + class AmexExpressCheckout < Stripe::StripeObject; end + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + + class Masterpass < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :billing_address, :email, :name, :shipping_address + end + + class SamsungPay < Stripe::StripeObject; end + + class VisaCheckout < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class ShippingAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :billing_address, :email, :name, :shipping_address + end + attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + end + attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :three_d_secure_usage, :wallet + end + + class CardPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + attr_reader :available, :preferred + end + + class Offline < Stripe::StripeObject + attr_reader :stored_at, :type + end + + class Wallet < Stripe::StripeObject + attr_reader :type + end + attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet + end + + class Cashapp < Stripe::StripeObject + attr_reader :buyer_id, :cashtag + end + + class CustomerBalance < Stripe::StripeObject; end + + class Eps < Stripe::StripeObject + attr_reader :bank + end + + class Fpx < Stripe::StripeObject + attr_reader :account_holder_type, :bank + end + + class Giropay < Stripe::StripeObject; end + class Gopay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject; end + + class IdBankTransfer < Stripe::StripeObject + attr_reader :bank, :bank_code, :bank_name, :display_name + end + + class Ideal < Stripe::StripeObject + attr_reader :bank, :bic + end + + class InteracPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + attr_reader :available, :preferred + end + attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method + end + + class KakaoPay < Stripe::StripeObject; end + + class Klarna < Stripe::StripeObject + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + attr_reader :dob + end + + class Konbini < Stripe::StripeObject; end + + class KrCard < Stripe::StripeObject + attr_reader :brand, :last4 + end + + class Link < Stripe::StripeObject + attr_reader :email, :persistent_token + end + + class MbWay < Stripe::StripeObject; end + class Mobilepay < Stripe::StripeObject; end + class Multibanco < Stripe::StripeObject; end + + class NaverPay < Stripe::StripeObject + attr_reader :funding + end + + class Oxxo < Stripe::StripeObject; end + + class P24 < Stripe::StripeObject + attr_reader :bank + end + + class Payco < Stripe::StripeObject; end + class Paynow < Stripe::StripeObject; end + + class Paypal < Stripe::StripeObject + attr_reader :fingerprint, :payer_email, :payer_id, :verified_email + end + + class Payto < Stripe::StripeObject + attr_reader :bsb_number, :last4, :pay_id + end + + class Pix < Stripe::StripeObject; end + class Promptpay < Stripe::StripeObject; end + class Qris < Stripe::StripeObject; end + + class RadarOptions < Stripe::StripeObject + attr_reader :session + end + + class Rechnung < Stripe::StripeObject + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + attr_reader :dob + end + + class RevolutPay < Stripe::StripeObject; end + class SamsungPay < Stripe::StripeObject; end + + class SepaDebit < Stripe::StripeObject + class GeneratedFrom < Stripe::StripeObject + attr_reader :charge, :setup_attempt + end + attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 + end + + class Shopeepay < Stripe::StripeObject; end + + class Sofort < Stripe::StripeObject + attr_reader :country + end + + class Swish < Stripe::StripeObject; end + class Twint < Stripe::StripeObject; end + + class UsBankAccount < Stripe::StripeObject + class Networks < Stripe::StripeObject + attr_reader :preferred, :supported + end + + class StatusDetails < Stripe::StripeObject + class Blocked < Stripe::StripeObject + attr_reader :network_code, :reason + end + attr_reader :blocked + end + attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details + end + + class WechatPay < Stripe::StripeObject; end + class Zip < Stripe::StripeObject; end + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + attr_reader :allow_redisplay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + attr_reader :customer + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Unique identifier for the object. + attr_reader :id + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Attribute for field mb_way + attr_reader :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_reader :radar_options + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip + # Attaches a PaymentMethod object to a Customer. # # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents) @@ -89,8 +457,8 @@ def self.detach(payment_method, params = {}, opts = {}) end # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_methods", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_methods", params: params, opts: opts) end # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index 441e4c4c4..c8d6adebb 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -26,6 +26,436 @@ def self.object_name "payment_method_configuration" end + class AcssDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Affirm < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class AfterpayClearpay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Alipay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Alma < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class AmazonPay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class ApplePay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class AuBecsDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class BacsDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Bancontact < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Blik < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Boleto < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Card < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class CartesBancaires < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Cashapp < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class CustomerBalance < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Eps < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Fpx < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Giropay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class GooglePay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Gopay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Grabpay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class IdBankTransfer < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Ideal < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Jcb < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Klarna < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Konbini < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Link < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Mobilepay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Multibanco < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Oxxo < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class P24 < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Paynow < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Paypal < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Payto < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Promptpay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Qris < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class RevolutPay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class SepaDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Shopeepay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Sofort < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Swish < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Twint < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class UsBankAccount < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class WechatPay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + + class Zip < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + attr_reader :overridable, :preference, :value + end + attr_reader :available, :display_preference + end + # Attribute for field acss_debit + attr_reader :acss_debit + # Whether the configuration can be used for new payments. + attr_reader :active + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field apple_pay + attr_reader :apple_pay + # For child configs, the Connect application associated with the configuration. + attr_reader :application + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field cartes_bancaires + attr_reader :cartes_bancaires + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Unique identifier for the object. + attr_reader :id + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # The default configuration is used whenever a payment method configuration is not specified. + attr_reader :is_default + # Attribute for field jcb + attr_reader :jcb + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field link + attr_reader :link + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # The configuration's name. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # For child configs, the configuration's parent configuration. + attr_reader :parent + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip + # Creates a payment method configuration def self.create(params = {}, opts = {}) request_stripe_object( @@ -37,11 +467,11 @@ def self.create(params = {}, opts = {}) end # List payment method configurations - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_method_configurations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb index 8ea787a59..6df3a2298 100644 --- a/lib/stripe/resources/payment_method_domain.rb +++ b/lib/stripe/resources/payment_method_domain.rb @@ -16,6 +16,63 @@ def self.object_name "payment_method_domain" end + class AmazonPay < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + attr_reader :error_message + end + attr_reader :status, :status_details + end + + class ApplePay < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + attr_reader :error_message + end + attr_reader :status, :status_details + end + + class GooglePay < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + attr_reader :error_message + end + attr_reader :status, :status_details + end + + class Link < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + attr_reader :error_message + end + attr_reader :status, :status_details + end + + class Paypal < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + attr_reader :error_message + end + attr_reader :status, :status_details + end + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :amazon_pay + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :apple_pay + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The domain name that this payment method domain object represents. + attr_reader :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + attr_reader :enabled + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :google_pay + # Unique identifier for the object. + attr_reader :id + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :link + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :paypal + # Creates a payment method domain. def self.create(params = {}, opts = {}) request_stripe_object( @@ -27,11 +84,11 @@ def self.create(params = {}, opts = {}) end # Lists the details of existing payment method domains. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_method_domains", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/payment_record.rb b/lib/stripe/resources/payment_record.rb index 847a3f0a1..d06e56715 100644 --- a/lib/stripe/resources/payment_record.rb +++ b/lib/stripe/resources/payment_record.rb @@ -12,6 +12,85 @@ def self.object_name "payment_record" end + class AmountCanceled < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountFailed < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountGuaranteed < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountRefunded < Stripe::StripeObject + attr_reader :currency, :value + end + + class AmountRequested < Stripe::StripeObject + attr_reader :currency, :value + end + + class CustomerDetails < Stripe::StripeObject + attr_reader :customer, :email, :name, :phone + end + + class PaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone + end + + class Custom < Stripe::StripeObject + attr_reader :display_name, :type + end + attr_reader :billing_details, :custom, :payment_method, :type + end + + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :name, :phone + end + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_canceled + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_failed + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_guaranteed + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_refunded + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Customer information for this payment. + attr_reader :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. + attr_reader :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # ID of the latest Payment Attempt Record attached to this Payment Record. + attr_reader :latest_payment_attempt_record + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Information about the Payment Method debited for this payment. + attr_reader :payment_method_details + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + attr_reader :payment_reference + # Shipping information for this payment. + attr_reader :shipping_details + # Report a new Payment Record. You may report a Payment Record as it is # initialized and later report updates through the other report_* methods, or report Payment # Records in a terminal state directly, through this method. diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb index 1f98b485b..4ca0a8aa9 100644 --- a/lib/stripe/resources/payout.rb +++ b/lib/stripe/resources/payout.rb @@ -20,6 +20,62 @@ def self.object_name "payout" end + class TraceId < Stripe::StripeObject + attr_reader :status, :value + end + # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + attr_reader :amount + # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + attr_reader :application_fee + # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + attr_reader :application_fee_amount + # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + attr_reader :arrival_date + # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + attr_reader :automatic + # ID of the balance transaction that describes the impact of this payout on your account balance. + attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # ID of the bank account or card the payout is sent to. + attr_reader :destination + # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + attr_reader :failure_balance_transaction + # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). + attr_reader :failure_code + # Message that provides the reason for a payout failure, if available. + attr_reader :failure_message + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + attr_reader :method + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # If the payout reverses another, this is the ID of the original payout. + attr_reader :original_payout + # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + attr_reader :reconciliation_status + # If the payout reverses, this is the ID of the payout that reverses this payout. + attr_reader :reversed_by + # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + attr_reader :source_type + # Extra information about a payout that displays on the user's bank statement. + attr_reader :statement_descriptor + # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + attr_reader :status + # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + attr_reader :trace_id + # Can be `bank_account` or `card`. + attr_reader :type + # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. def cancel(params = {}, opts = {}) request_stripe_object( @@ -50,8 +106,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payouts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payouts", params: params, opts: opts) end # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb index 1262a5ad9..b4d84fddc 100644 --- a/lib/stripe/resources/person.rb +++ b/lib/stripe/resources/person.rb @@ -15,6 +15,134 @@ def self.object_name "person" end + class AdditionalTosAcceptances < Stripe::StripeObject + class Account < Stripe::StripeObject + attr_reader :date, :ip, :user_agent + end + attr_reader :account + end + + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class AddressKana < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + end + + class AddressKanji < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + end + + class Dob < Stripe::StripeObject + attr_reader :day, :month, :year + end + + class FutureRequirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + attr_reader :alternative_fields_due, :original_fields_due + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification + end + + class RegisteredAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class Relationship < Stripe::StripeObject + attr_reader :authorizer, :director, :executive, :legal_guardian, :owner, :percent_ownership, :representative, :title + end + + class Requirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + attr_reader :alternative_fields_due, :original_fields_due + end + + class Error < Stripe::StripeObject + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification + end + + class Verification < Stripe::StripeObject + class AdditionalDocument < Stripe::StripeObject + attr_reader :back, :details, :details_code, :front + end + + class Document < Stripe::StripeObject + attr_reader :back, :details, :details_code, :front + end + attr_reader :additional_document, :details, :details_code, :document, :status + end + # The account the person is associated with. + attr_reader :account + # Attribute for field additional_tos_acceptances + attr_reader :additional_tos_acceptances + # Attribute for field address + attr_reader :address + # The Kana variation of the person's address (Japan only). + attr_reader :address_kana + # The Kanji variation of the person's address (Japan only). + attr_reader :address_kanji + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Attribute for field dob + attr_reader :dob + # The person's email address. + attr_reader :email + # The person's first name. + attr_reader :first_name + # The Kana variation of the person's first name (Japan only). + attr_reader :first_name_kana + # The Kanji variation of the person's first name (Japan only). + attr_reader :first_name_kanji + # A list of alternate names or aliases that the person is known by. + attr_reader :full_name_aliases + # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + attr_reader :future_requirements + # The person's gender. + attr_reader :gender + # Unique identifier for the object. + attr_reader :id + # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). + attr_reader :id_number_provided + # Whether the person's `id_number_secondary` was provided. + attr_reader :id_number_secondary_provided + # The person's last name. + attr_reader :last_name + # The Kana variation of the person's last name (Japan only). + attr_reader :last_name_kana + # The Kanji variation of the person's last name (Japan only). + attr_reader :last_name_kanji + # The person's maiden name. + attr_reader :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The country where the person is a national. + attr_reader :nationality + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The person's phone number. + attr_reader :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_reader :political_exposure + # Attribute for field registered_address + attr_reader :registered_address + # Attribute for field relationship + attr_reader :relationship + # Information about the requirements for this person, including what information needs to be collected, and by when. + attr_reader :requirements + # Whether the last four digits of the person's Social Security number have been provided (U.S. only). + attr_reader :ssn_last_4_provided + # Attribute for field verification + attr_reader :verification + # Always true for a deleted object + attr_reader :deleted + def resource_url if !respond_to?(:account) || account.nil? raise NotImplementedError, diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb index 3b2d7cbd2..5a511b26c 100644 --- a/lib/stripe/resources/plan.rb +++ b/lib/stripe/resources/plan.rb @@ -21,6 +21,58 @@ def self.object_name "plan" end + class Tier < Stripe::StripeObject + attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + end + + class TransformUsage < Stripe::StripeObject + attr_reader :divide_by, :round + end + # Whether the plan can be used for new purchases. + attr_reader :active + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + attr_reader :aggregate_usage + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + attr_reader :amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + attr_reader :amount_decimal + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_reader :billing_scheme + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Unique identifier for the object. + attr_reader :id + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + attr_reader :interval_count + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The meter tracking the usage of a metered price + attr_reader :meter + # A brief description of the plan, hidden from customers. + attr_reader :nickname + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The product whose pricing this plan determines. + attr_reader :product + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_reader :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + attr_reader :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + attr_reader :transform_usage + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_reader :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_reader :usage_type + # Always true for a deleted object + attr_reader :deleted + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/plans", params: params, opts: opts) @@ -47,8 +99,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your plans. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/plans", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/plans", params: params, opts: opts) end # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb index 6b75f9e40..c6b771cd6 100644 --- a/lib/stripe/resources/price.rb +++ b/lib/stripe/resources/price.rb @@ -19,14 +19,91 @@ def self.object_name "price" end + class CurrencyOptions < Stripe::StripeObject + class CustomUnitAmount < Stripe::StripeObject + attr_reader :maximum, :minimum, :preset + end + + class Tier < Stripe::StripeObject + attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + end + attr_reader :custom_unit_amount, :tax_behavior, :tiers, :unit_amount, :unit_amount_decimal + end + + class CustomUnitAmount < Stripe::StripeObject + attr_reader :maximum, :minimum, :preset + end + + class MigrateTo < Stripe::StripeObject + attr_reader :behavior, :effective_after, :price + end + + class Recurring < Stripe::StripeObject + attr_reader :aggregate_usage, :interval, :interval_count, :meter, :trial_period_days, :usage_type + end + + class Tier < Stripe::StripeObject + attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + end + + class TransformQuantity < Stripe::StripeObject + attr_reader :divide_by, :round + end + # Whether the price can be used for new purchases. + attr_reader :active + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_reader :billing_scheme + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_reader :custom_unit_amount + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + attr_reader :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Subscriptions using this price will be migrated to use the new referenced price. + attr_reader :migrate_to + # A brief description of the price, hidden from customers. + attr_reader :nickname + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ID of the product this price is associated with. + attr_reader :product + # The recurring components of a price such as `interval` and `usage_type`. + attr_reader :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_reader :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_reader :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + attr_reader :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + attr_reader :transform_quantity + # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + attr_reader :type + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount_decimal + # Always true for a deleted object + attr_reader :deleted + # Creates a new price for an existing product. The price can be recurring or one-time. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/prices", params: params, opts: opts) end # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/prices", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/prices", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb index adb55160c..49e7400a6 100644 --- a/lib/stripe/resources/product.rb +++ b/lib/stripe/resources/product.rb @@ -25,6 +25,66 @@ def self.object_name nested_resource_class_methods :feature, operations: %i[create retrieve delete list] + class MarketingFeature < Stripe::StripeObject + attr_reader :name + end + + class PackageDimensions < Stripe::StripeObject + attr_reader :height, :length, :weight, :width + end + + class Provisioning < Stripe::StripeObject + class GiftCard < Stripe::StripeObject + class FixedAmount < Stripe::StripeObject + attr_reader :amount, :currency + end + attr_reader :fixed_amount, :type + end + attr_reader :gift_card, :type + end + # Whether the product is currently available for purchase. + attr_reader :active + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + attr_reader :default_price + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_reader :images + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + attr_reader :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The product's name, meant to be displayable to the customer. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The dimensions of this product for shipping purposes. + attr_reader :package_dimensions + # Provisioning configuration for this product. + attr_reader :provisioning + # Whether this product is shipped (i.e., physical goods). + attr_reader :shippable + # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + attr_reader :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_reader :tax_code + # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + attr_reader :type + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_reader :unit_label + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # A URL of a publicly-accessible webpage for this product. + attr_reader :url + # Always true for a deleted object + attr_reader :deleted + # Creates a new product object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/products", params: params, opts: opts) @@ -51,8 +111,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/products", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/products", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/product_feature.rb b/lib/stripe/resources/product_feature.rb index 5a36e5647..ebf0ba3e5 100644 --- a/lib/stripe/resources/product_feature.rb +++ b/lib/stripe/resources/product_feature.rb @@ -9,5 +9,17 @@ class ProductFeature < APIResource def self.object_name "product_feature" end + + # A feature represents a monetizable ability or functionality in your system. + # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + attr_reader :entitlement_feature + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Always true for a deleted object + attr_reader :deleted end end diff --git a/lib/stripe/resources/promotion_code.rb b/lib/stripe/resources/promotion_code.rb index dd285a1f3..0a4059b60 100644 --- a/lib/stripe/resources/promotion_code.rb +++ b/lib/stripe/resources/promotion_code.rb @@ -14,14 +14,49 @@ def self.object_name "promotion_code" end + class Restrictions < Stripe::StripeObject + class CurrencyOptions < Stripe::StripeObject + attr_reader :minimum_amount + end + attr_reader :currency_options, :first_time_transaction, :minimum_amount, :minimum_amount_currency + end + # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + attr_reader :active + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + attr_reader :code + # A coupon contains information about a percent-off or amount-off discount you + # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + attr_reader :coupon + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The customer that this promotion code can be used by. + attr_reader :customer + # Date at which the promotion code can no longer be redeemed. + attr_reader :expires_at + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Maximum number of times this promotion code can be redeemed. + attr_reader :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field restrictions + attr_reader :restrictions + # Number of times this promotion code has been used. + attr_reader :times_redeemed + # A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/promotion_codes", params: params, opts: opts) end # Returns a list of your promotion codes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/promotion_codes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/promotion_codes", params: params, opts: opts) end # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index ca8f340c0..644f26439 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -18,6 +18,258 @@ def self.object_name nested_resource_class_methods :preview_invoice, operations: %i[list] nested_resource_class_methods :preview_subscription_schedule, operations: %i[list] + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability, :status + end + + class Computed < Stripe::StripeObject + class LastReestimationDetails < Stripe::StripeObject + class Failed < Stripe::StripeObject + attr_reader :failure_code, :message, :reason + end + attr_reader :failed, :status + end + + class Recurring < Stripe::StripeObject + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :discounts, :taxes + end + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + end + attr_reader :amount_subtotal, :amount_total, :interval, :interval_count, :total_details + end + + class Upfront < Stripe::StripeObject + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :discounts, :taxes + end + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + end + attr_reader :amount_subtotal, :amount_total, :line_items, :total_details + end + attr_reader :last_reestimation_details, :recurring, :updated_at, :upfront + end + + class FromQuote < Stripe::StripeObject + attr_reader :is_revision, :quote + end + + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :days_until_due, :issuer + end + + class StatusDetails < Stripe::StripeObject + class Canceled < Stripe::StripeObject + attr_reader :reason, :transitioned_at + end + + class Stale < Stripe::StripeObject + class LastReason < Stripe::StripeObject + class LinesInvalid < Stripe::StripeObject + attr_reader :invalid_at, :lines + end + + class SubscriptionChanged < Stripe::StripeObject + attr_reader :previous_subscription + end + + class SubscriptionScheduleChanged < Stripe::StripeObject + attr_reader :previous_subscription_schedule + end + attr_reader :line_invalid, :lines_invalid, :marked_stale, :subscription_canceled, :subscription_changed, :subscription_expired, :subscription_schedule_canceled, :subscription_schedule_changed, :subscription_schedule_released, :type + end + attr_reader :expires_at, :last_reason, :last_updated_at, :transitioned_at + end + attr_reader :canceled, :stale + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :accepted_at, :canceled_at, :finalized_at + end + + class SubscriptionData < Stripe::StripeObject + class BillOnAcceptance < Stripe::StripeObject + class BillFrom < Stripe::StripeObject + class LineStartsAt < Stripe::StripeObject + attr_reader :id + end + attr_reader :computed, :line_starts_at, :timestamp, :type + end + + class BillUntil < Stripe::StripeObject + class Duration < Stripe::StripeObject + attr_reader :interval, :interval_count + end + + class LineEndsAt < Stripe::StripeObject + attr_reader :id + end + attr_reader :computed, :duration, :line_ends_at, :timestamp, :type + end + attr_reader :bill_from, :bill_until + end + + class Prebilling < Stripe::StripeObject + attr_reader :iterations + end + attr_reader :bill_on_acceptance, :billing_behavior, :billing_cycle_anchor, :description, :effective_date, :end_behavior, :from_subscription, :metadata, :prebilling, :proration_behavior, :trial_period_days + end + + class SubscriptionDataOverride < Stripe::StripeObject + class AppliesTo < Stripe::StripeObject + attr_reader :new_reference, :subscription_schedule, :type + end + + class BillOnAcceptance < Stripe::StripeObject + class BillFrom < Stripe::StripeObject + class LineStartsAt < Stripe::StripeObject + attr_reader :id + end + attr_reader :computed, :line_starts_at, :timestamp, :type + end + + class BillUntil < Stripe::StripeObject + class Duration < Stripe::StripeObject + attr_reader :interval, :interval_count + end + + class LineEndsAt < Stripe::StripeObject + attr_reader :id + end + attr_reader :computed, :duration, :line_ends_at, :timestamp, :type + end + attr_reader :bill_from, :bill_until + end + attr_reader :applies_to, :bill_on_acceptance, :billing_behavior, :customer, :description, :end_behavior, :proration_behavior + end + + class SubscriptionSchedule < Stripe::StripeObject + class AppliesTo < Stripe::StripeObject + attr_reader :new_reference, :subscription_schedule, :type + end + attr_reader :applies_to, :subscription_schedule + end + + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :discounts, :taxes + end + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :amount_percent, :destination + end + # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + attr_reader :allow_backdated_lines + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total after discounts and taxes are applied. + attr_reader :amount_total + # ID of the Connect Application that created the quote. + attr_reader :application + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + attr_reader :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_reader :collection_method + # Attribute for field computed + attr_reader :computed + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_reader :customer + # The tax rates applied to this quote. + attr_reader :default_tax_rates + # A description that will be displayed on the quote PDF. + attr_reader :description + # The discounts applied to this quote. + attr_reader :discounts + # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + attr_reader :expires_at + # A footer that will be displayed on the quote PDF. + attr_reader :footer + # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + attr_reader :from_quote + # A header that will be displayed on the quote PDF. + attr_reader :header + # Unique identifier for the object. + attr_reader :id + # The invoice that was created from this quote. + attr_reader :invoice + # Attribute for field invoice_settings + attr_reader :invoice_settings + # A list of items the customer is being quoted for. + attr_reader :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + attr_reader :on_behalf_of + # The status of the quote. + attr_reader :status + # Details on when and why a quote has been marked as stale or canceled. + attr_reader :status_details + # Attribute for field status_transitions + attr_reader :status_transitions + # The subscription that was created or updated from this quote. + attr_reader :subscription + # Attribute for field subscription_data + attr_reader :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + attr_reader :subscription_data_overrides + # The subscription schedule that was created or updated from this quote. + attr_reader :subscription_schedule + # The subscription schedules that were created or updated from this quote. + attr_reader :subscription_schedules + # ID of the test clock this quote belongs to. + attr_reader :test_clock + # Attribute for field total_details + attr_reader :total_details + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + attr_reader :transfer_data + # Accepts the specified quote. def accept(params = {}, opts = {}) request_stripe_object( @@ -84,8 +336,8 @@ def self.finalize_quote(quote, params = {}, opts = {}) end # Returns a list of your quotes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/quotes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/quotes", params: params, opts: opts) end # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. diff --git a/lib/stripe/resources/quote_preview_invoice.rb b/lib/stripe/resources/quote_preview_invoice.rb index e7068e8b2..559d0b20f 100644 --- a/lib/stripe/resources/quote_preview_invoice.rb +++ b/lib/stripe/resources/quote_preview_invoice.rb @@ -39,5 +39,336 @@ class QuotePreviewInvoice < APIResource def self.object_name "quote_preview_invoice" end + + class AmountsDue < Stripe::StripeObject + attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status + end + + class AppliesTo < Stripe::StripeObject + attr_reader :new_reference, :subscription_schedule, :type + end + + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability, :status + end + + class CustomField < Stripe::StripeObject + attr_reader :name, :value + end + + class CustomerAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class CustomerShipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class CustomerTaxId < Stripe::StripeObject + attr_reader :type, :value + end + + class FromInvoice < Stripe::StripeObject + attr_reader :action, :invoice + end + + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + + class LastFinalizationError < Stripe::StripeObject + attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + end + + class PaymentSettings < Stripe::StripeObject + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :transaction_type + end + attr_reader :mandate_options, :verification_method + end + + class Bancontact < Stripe::StripeObject + attr_reader :preferred_language + end + + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + attr_reader :enabled + end + attr_reader :installments, :request_three_d_secure + end + + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :country + end + attr_reader :eu_bank_transfer, :type + end + attr_reader :bank_transfer, :funding_type + end + + class IdBankTransfer < Stripe::StripeObject; end + class Konbini < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :institution + end + attr_reader :filters, :permissions, :prefetch + end + attr_reader :financial_connections, :verification_method + end + attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + end + attr_reader :default_mandate, :payment_method_options, :payment_method_types + end + + class Rendering < Stripe::StripeObject + class Pdf < Stripe::StripeObject + attr_reader :page_size + end + attr_reader :amount_tax_display, :pdf, :template, :template_version + end + + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + attr_reader :amount, :rate, :taxability_reason, :taxable_amount + end + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + end + + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at + end + + class SubscriptionDetails < Stripe::StripeObject + class PauseCollection < Stripe::StripeObject + attr_reader :behavior, :resumes_at + end + attr_reader :metadata, :pause_collection + end + + class ThresholdReason < Stripe::StripeObject + class ItemReason < Stripe::StripeObject + attr_reader :line_item_ids, :usage_gte + end + attr_reader :amount_gte, :item_reasons + end + + class TotalDiscountAmount < Stripe::StripeObject + attr_reader :amount, :discount + end + + class TotalMarginAmount < Stripe::StripeObject + attr_reader :amount, :margin + end + + class TotalPretaxCreditAmount < Stripe::StripeObject + attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + end + + class TotalTaxAmount < Stripe::StripeObject + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + end + + class TransferData < Stripe::StripeObject + attr_reader :amount, :destination + end + # The country of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_country + # The public name of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_name + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_reader :account_tax_ids + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + attr_reader :amount_due + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. + attr_reader :amount_overpaid + # The amount, in cents (or local equivalent), that was paid. + attr_reader :amount_paid + # The difference between amount_due and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + attr_reader :amounts_due + # ID of the Connect Application that created the invoice. + attr_reader :application + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + attr_reader :application_fee_amount + # Attribute for field applies_to + attr_reader :applies_to + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + attr_reader :attempt_count + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + attr_reader :attempted + # Attribute for field automatic_tax + attr_reader :automatic_tax + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + attr_reader :automatically_finalizes_at + # Indicates the reason why the invoice was created. + # + # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + # * `subscription_create`: A new subscription was created. + # * `subscription_cycle`: A subscription advanced into a new period. + # * `subscription_threshold`: A subscription reached a billing threshold. + # * `subscription_update`: A subscription was updated. + # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + attr_reader :billing_reason + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + attr_reader :collection_method + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Custom fields displayed on the invoice. + attr_reader :custom_fields + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_address + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_email + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_name + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_phone + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_shipping + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_exempt + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_ids + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + attr_reader :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_reader :default_source + # The tax rates applied to this invoice, if any. + attr_reader :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_reader :description + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + attr_reader :discount + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + attr_reader :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_reader :effective_at + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :ending_balance + # Footer displayed on the invoice. + attr_reader :footer + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + attr_reader :from_invoice + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + attr_reader :id + # Attribute for field issuer + attr_reader :issuer + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + attr_reader :last_finalization_error + # The ID of the most recent non-draft revision of this invoice + attr_reader :latest_revision + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + attr_reader :next_payment_attempt + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_reader :on_behalf_of + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + attr_reader :paid + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + attr_reader :paid_out_of_band + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + attr_reader :payment_intent + # Attribute for field payment_settings + attr_reader :payment_settings + # Payments for this invoice + attr_reader :payments + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_end + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_start + # Total amount of all post-payment credit notes issued for this invoice. + attr_reader :post_payment_credit_notes_amount + # Total amount of all pre-payment credit notes issued for this invoice. + attr_reader :pre_payment_credit_notes_amount + # The quote this invoice was generated from. + attr_reader :quote + # This is the transaction number that appears on email receipts sent for this invoice. + attr_reader :receipt_number + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_reader :rendering + # The details of the cost of shipping, including the ShippingRate applied on the invoice. + attr_reader :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_reader :shipping_details + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + attr_reader :starting_balance + # Extra information about an invoice for the customer's credit card statement. + attr_reader :statement_descriptor + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # Attribute for field subscription + attr_reader :subscription + # Details about the subscription that created this invoice. + attr_reader :subscription_details + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + attr_reader :subscription_proration_date + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + attr_reader :subtotal + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + attr_reader :subtotal_excluding_tax + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + attr_reader :tax + # ID of the test clock this invoice belongs to. + attr_reader :test_clock + # Attribute for field threshold_reason + attr_reader :threshold_reason + # Total after discounts and taxes. + attr_reader :total + # The aggregate amounts calculated per discount across all line items. + attr_reader :total_discount_amounts + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + attr_reader :total_excluding_tax + # The aggregate amounts calculated per margin across all line items. + attr_reader :total_margin_amounts + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + attr_reader :total_pretax_credit_amounts + # The aggregate amounts calculated per tax rate for all line items. + attr_reader :total_tax_amounts + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + attr_reader :transfer_data + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + attr_reader :webhooks_delivered_at end end diff --git a/lib/stripe/resources/quote_preview_subscription_schedule.rb b/lib/stripe/resources/quote_preview_subscription_schedule.rb index 1a408efd0..b17e42851 100644 --- a/lib/stripe/resources/quote_preview_subscription_schedule.rb +++ b/lib/stripe/resources/quote_preview_subscription_schedule.rb @@ -7,5 +7,164 @@ class QuotePreviewSubscriptionSchedule < APIResource def self.object_name "quote_preview_subscription_schedule" end + + class AppliesTo < Stripe::StripeObject + attr_reader :new_reference, :subscription_schedule, :type + end + + class CurrentPhase < Stripe::StripeObject + attr_reader :end_date, :start_date + end + + class DefaultSettings < Stripe::StripeObject + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability + end + + class BillingThresholds < Stripe::StripeObject + attr_reader :amount_gte, :reset_billing_cycle_anchor + end + + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :account_tax_ids, :days_until_due, :issuer + end + + class TransferData < Stripe::StripeObject + attr_reader :amount_percent, :destination + end + attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data + end + + class LastPriceMigrationError < Stripe::StripeObject + class FailedTransition < Stripe::StripeObject + attr_reader :source_price, :target_price + end + attr_reader :errored_at, :failed_transitions, :type + end + + class Phase < Stripe::StripeObject + class AddInvoiceItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + attr_reader :discounts, :price, :quantity, :tax_rates + end + + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability + end + + class BillingThresholds < Stripe::StripeObject + attr_reader :amount_gte, :reset_billing_cycle_anchor + end + + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :account_tax_ids, :days_until_due, :issuer + end + + class Item < Stripe::StripeObject + class BillingThresholds < Stripe::StripeObject + attr_reader :usage_gte + end + + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class Trial < Stripe::StripeObject + attr_reader :converts_to, :type + end + attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial + end + + class PauseCollection < Stripe::StripeObject + attr_reader :behavior + end + + class TransferData < Stripe::StripeObject + attr_reader :amount_percent, :destination + end + + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + attr_reader :prorate_up_front + end + attr_reader :end_behavior + end + attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings + end + + class Prebilling < Stripe::StripeObject + attr_reader :invoice, :period_end, :period_start, :update_behavior + end + # ID of the Connect Application that created the schedule. + attr_reader :application + # Attribute for field applies_to + attr_reader :applies_to + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + attr_reader :completed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + attr_reader :current_phase + # ID of the customer who owns the subscription schedule. + attr_reader :customer + # Attribute for field default_settings + attr_reader :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_reader :end_behavior + # Unique identifier for the object. + attr_reader :id + # Details of the most recent price migration that failed for the subscription schedule. + attr_reader :last_price_migration_error + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Configuration for the subscription schedule's phases. + attr_reader :phases + # Time period and invoice for a Subscription billed in advance. + attr_reader :prebilling + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + attr_reader :released_at + # ID of the subscription once managed by the subscription schedule (if it is released). + attr_reader :released_subscription + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + attr_reader :status + # ID of the subscription managed by the subscription schedule. + attr_reader :subscription + # ID of the test clock this subscription schedule belongs to. + attr_reader :test_clock end end diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb index 04a169878..d8179b712 100644 --- a/lib/stripe/resources/radar/early_fraud_warning.rb +++ b/lib/stripe/resources/radar/early_fraud_warning.rb @@ -15,12 +15,29 @@ def self.object_name "radar.early_fraud_warning" end + # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + attr_reader :actionable + # ID of the charge this early fraud warning is for, optionally expanded. + attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + attr_reader :fraud_type + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the Payment Intent this early fraud warning is for, optionally expanded. + attr_reader :payment_intent + # Returns a list of early fraud warnings. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/early_fraud_warnings", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb index 80d1839ce..b3d851434 100644 --- a/lib/stripe/resources/radar/value_list.rb +++ b/lib/stripe/resources/radar/value_list.rb @@ -17,6 +17,29 @@ def self.object_name "radar.value_list" end + # The name of the value list for use in rules. + attr_reader :alias + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The name or email address of the user who created this value list. + attr_reader :created_by + # Unique identifier for the object. + attr_reader :id + # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. + attr_reader :item_type + # List of items contained within this value list. + attr_reader :list_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The name of the value list. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Always true for a deleted object + attr_reader :deleted + # Creates a new ValueList object, which can then be referenced in rules. def self.create(params = {}, opts = {}) request_stripe_object( @@ -48,11 +71,11 @@ def delete(params = {}, opts = {}) end # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_lists", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb index 1940e1702..ad0f3f050 100644 --- a/lib/stripe/resources/radar/value_list_item.rb +++ b/lib/stripe/resources/radar/value_list_item.rb @@ -16,6 +16,23 @@ def self.object_name "radar.value_list_item" end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The name or email address of the user who added this item to the value list. + attr_reader :created_by + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The value of the item. + attr_reader :value + # The identifier of the value list this item belongs to. + attr_reader :value_list + # Always true for a deleted object + attr_reader :deleted + # Creates a new ValueListItem object, which is added to the specified parent value list. def self.create(params = {}, opts = {}) request_stripe_object( @@ -47,11 +64,11 @@ def delete(params = {}, opts = {}) end # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_list_items", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index ad962b2da..0690f677d 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -17,6 +17,136 @@ def self.object_name "refund" end + class DestinationDetails < Stripe::StripeObject + class Affirm < Stripe::StripeObject; end + class AfterpayClearpay < Stripe::StripeObject; end + class Alipay < Stripe::StripeObject; end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBankTransfer < Stripe::StripeObject; end + + class Blik < Stripe::StripeObject + attr_reader :network_decline_code, :reference, :reference_status + end + + class BrBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class Card < Stripe::StripeObject + attr_reader :reference, :reference_status, :reference_type, :type + end + + class Cashapp < Stripe::StripeObject; end + class CustomerCashBalance < Stripe::StripeObject; end + class Eps < Stripe::StripeObject; end + + class EuBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class GbBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class Giropay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject; end + + class IdBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class JpBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class Klarna < Stripe::StripeObject; end + + class Multibanco < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class MxBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class P24 < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class Paynow < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject; end + class Pix < Stripe::StripeObject; end + class Revolut < Stripe::StripeObject; end + class Sofort < Stripe::StripeObject; end + + class Swish < Stripe::StripeObject + attr_reader :network_decline_code, :reference, :reference_status + end + + class ThBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class UsBankTransfer < Stripe::StripeObject + attr_reader :reference, :reference_status + end + + class WechatPay < Stripe::StripeObject; end + class Zip < Stripe::StripeObject; end + attr_reader :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_bank_transfer, :blik, :br_bank_transfer, :card, :cashapp, :customer_cash_balance, :eps, :eu_bank_transfer, :gb_bank_transfer, :giropay, :grabpay, :id_bank_transfer, :jp_bank_transfer, :klarna, :multibanco, :mx_bank_transfer, :p24, :paynow, :paypal, :pix, :revolut, :sofort, :swish, :th_bank_transfer, :type, :us_bank_transfer, :wechat_pay, :zip + end + + class NextAction < Stripe::StripeObject + class DisplayDetails < Stripe::StripeObject + class EmailSent < Stripe::StripeObject + attr_reader :email_sent_at, :email_sent_to + end + attr_reader :email_sent, :expires_at + end + attr_reader :display_details, :type + end + # Amount, in cents (or local equivalent). + attr_reader :amount + # Balance transaction that describes the impact on your account balance. + attr_reader :balance_transaction + # ID of the charge that's refunded. + attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + attr_reader :description + # Attribute for field destination_details + attr_reader :destination_details + # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + attr_reader :failure_balance_transaction + # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. + attr_reader :failure_reason + # Unique identifier for the object. + attr_reader :id + # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + attr_reader :instructions_email + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Attribute for field next_action + attr_reader :next_action + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the PaymentIntent that's refunded. + attr_reader :payment_intent + # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + attr_reader :reason + # This is the transaction number that appears on email receipts sent for this refund. + attr_reader :receipt_number + # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + attr_reader :source_transfer_reversal + # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + attr_reader :status + # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + attr_reader :transfer_reversal + # Cancels a refund with a status of requires_action. # # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state. @@ -57,8 +187,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/refunds", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/refunds", params: params, opts: opts) end # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. diff --git a/lib/stripe/resources/reporting/report_run.rb b/lib/stripe/resources/reporting/report_run.rb index 32f259be0..2107ed9cc 100644 --- a/lib/stripe/resources/reporting/report_run.rb +++ b/lib/stripe/resources/reporting/report_run.rb @@ -20,6 +20,35 @@ def self.object_name "reporting.report_run" end + class Parameters < Stripe::StripeObject + attr_reader :columns, :connected_account, :currency, :interval_end, :interval_start, :payout, :reporting_category, :timezone + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # If something should go wrong during the run, a message about the failure (populated when + # `status=failed`). + attr_reader :error + # Unique identifier for the object. + attr_reader :id + # `true` if the report is run on live mode data and `false` if it is run on test mode data. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field parameters + attr_reader :parameters + # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + attr_reader :report_type + # The file object representing the result of the report run (populated when + # `status=succeeded`). + attr_reader :result + # Status of this report run. This will be `pending` when the run is initially created. + # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + attr_reader :status + # Timestamp at which this run successfully finished (populated when + # `status=succeeded`). Measured in seconds since the Unix epoch. + attr_reader :succeeded_at + # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) def self.create(params = {}, opts = {}) request_stripe_object( @@ -31,11 +60,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Report Runs, with the most recent appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/reporting/report_runs", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/reporting/report_type.rb b/lib/stripe/resources/reporting/report_type.rb index 8d0683253..66015ce00 100644 --- a/lib/stripe/resources/reporting/report_type.rb +++ b/lib/stripe/resources/reporting/report_type.rb @@ -19,12 +19,31 @@ def self.object_name "reporting.report_type" end + # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + attr_reader :data_available_end + # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + attr_reader :data_available_start + # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + attr_reader :default_columns + # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Human-readable name of the Report Type + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # When this Report Type was latest updated. Measured in seconds since the Unix epoch. + attr_reader :updated + # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + attr_reader :version + # Returns a full list of Report Types. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/reporting/report_types", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/reversal.rb b/lib/stripe/resources/reversal.rb index 5dd783112..9ae781796 100644 --- a/lib/stripe/resources/reversal.rb +++ b/lib/stripe/resources/reversal.rb @@ -23,6 +23,27 @@ def self.object_name "transfer_reversal" end + # Amount, in cents (or local equivalent). + attr_reader :amount + # Balance transaction that describes the impact on your account balance. + attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Linked payment refund for the transfer reversal. + attr_reader :destination_payment_refund + # Unique identifier for the object. + attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # ID of the refund responsible for the transfer reversal. + attr_reader :source_refund + # ID of the transfer that was reversed. + attr_reader :transfer + def resource_url "#{Transfer.resource_url}/#{CGI.escape(transfer)}/reversals" \ "/#{CGI.escape(id)}" diff --git a/lib/stripe/resources/review.rb b/lib/stripe/resources/review.rb index d94344ff6..4f31f8ed4 100644 --- a/lib/stripe/resources/review.rb +++ b/lib/stripe/resources/review.rb @@ -14,6 +14,42 @@ def self.object_name "review" end + class IpAddressLocation < Stripe::StripeObject + attr_reader :city, :country, :latitude, :longitude, :region + end + + class Session < Stripe::StripeObject + attr_reader :browser, :device, :platform, :version + end + # The ZIP or postal code of the card used, if applicable. + attr_reader :billing_zip + # The charge associated with this review. + attr_reader :charge + # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + attr_reader :closed_reason + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # The IP address where the payment originated. + attr_reader :ip_address + # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + attr_reader :ip_address_location + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # If `true`, the review needs action. + attr_reader :open + # The reason the review was opened. One of `rule` or `manual`. + attr_reader :opened_reason + # The PaymentIntent ID associated with this review, if one exists. + attr_reader :payment_intent + # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + attr_reader :reason + # Information related to the browsing session of the user who initiated the payment. + attr_reader :session + # Approves a Review object, closing it and removing it from the list of reviews. def approve(params = {}, opts = {}) request_stripe_object( @@ -35,8 +71,8 @@ def self.approve(review, params = {}, opts = {}) end # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/reviews", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/reviews", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index bbe8eb25d..f8a41b44e 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -14,9 +14,110 @@ def self.object_name "setup_attempt" end + class PaymentMethodDetails < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBecsDebit < Stripe::StripeObject; end + class BacsDebit < Stripe::StripeObject; end + + class Bancontact < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + end + + class Boleto < Stripe::StripeObject; end + + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + end + + class ThreeDSecure < Stripe::StripeObject + attr_reader :authentication_flow, :electronic_commerce_indicator, :result, :result_reason, :transaction_id, :version + end + + class Wallet < Stripe::StripeObject + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + attr_reader :apple_pay, :google_pay, :type + end + attr_reader :brand, :checks, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :network, :three_d_secure, :wallet + end + + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + attr_reader :stored_at, :type + end + attr_reader :generated_card, :offline + end + + class Cashapp < Stripe::StripeObject; end + + class IdBankTransfer < Stripe::StripeObject + attr_reader :bank, :bank_code, :bank_name, :display_name + end + + class Ideal < Stripe::StripeObject + attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name + end + + class KakaoPay < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject; end + class KrCard < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject; end + class Payto < Stripe::StripeObject; end + class RevolutPay < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + + class Sofort < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + end + + class UsBankAccount < Stripe::StripeObject; end + attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :card_present, :cashapp, :id_bank_transfer, :ideal, :kakao_pay, :klarna, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :sofort, :type, :us_bank_account + end + + class SetupError < Stripe::StripeObject + attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + end + # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + attr_reader :application + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_reader :attach_to_self + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + attr_reader :customer + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_reader :flow_directions + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + attr_reader :on_behalf_of + # ID of the payment method used with this SetupAttempt. + attr_reader :payment_method + # Attribute for field payment_method_details + attr_reader :payment_method_details + # The error encountered during this attempt to confirm the SetupIntent, if any. + attr_reader :setup_error + # ID of the SetupIntent that this attempt belongs to. + attr_reader :setup_intent + # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + attr_reader :status + # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + attr_reader :usage + # Returns a list of SetupAttempts that associate with a provided SetupIntent. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/setup_attempts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/setup_attempts", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index 9aa3b2b66..a2ad9482c 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -33,6 +33,160 @@ def self.object_name "setup_intent" end + class AutomaticPaymentMethods < Stripe::StripeObject + attr_reader :allow_redirects, :enabled + end + + class LastSetupError < Stripe::StripeObject + attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + end + + class NextAction < Stripe::StripeObject + class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject + class QrCode < Stripe::StripeObject + attr_reader :expires_at, :image_url_png, :image_url_svg + end + attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + end + + class RedirectToUrl < Stripe::StripeObject + attr_reader :return_url, :url + end + + class VerifyWithMicrodeposits < Stripe::StripeObject + attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type + end + attr_reader :cashapp_handle_redirect_or_display_qr_code, :redirect_to_url, :type, :use_stripe_sdk, :verify_with_microdeposits + end + + class PaymentMethodConfigurationDetails < Stripe::StripeObject + attr_reader :id, :parent + end + + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type + end + attr_reader :currency, :mandate_options, :verification_method + end + + class AmazonPay < Stripe::StripeObject; end + + class BacsDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options + end + + class Card < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :amount, :amount_type, :currency, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types + end + attr_reader :mandate_options, :network, :request_three_d_secure + end + + class CardPresent < Stripe::StripeObject; end + + class Link < Stripe::StripeObject + attr_reader :persistent_token + end + + class Paypal < Stripe::StripeObject + attr_reader :billing_agreement_id, :currency, :subsellers + end + + class Payto < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + end + attr_reader :mandate_options + end + + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + attr_reader :mandate_options + end + + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :institution + end + + class ManualEntry < Stripe::StripeObject + attr_reader :mode + end + attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + end + + class MandateOptions < Stripe::StripeObject + attr_reader :collection_method + end + attr_reader :financial_connections, :mandate_options, :verification_method + end + attr_reader :acss_debit, :amazon_pay, :bacs_debit, :card, :card_present, :link, :paypal, :payto, :sepa_debit, :us_bank_account + end + # ID of the Connect application that created the SetupIntent. + attr_reader :application + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_reader :attach_to_self + # Settings for dynamic payment methods compatible with this Setup Intent + attr_reader :automatic_payment_methods + # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + attr_reader :cancellation_reason + # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + # + # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + attr_reader :client_secret + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_reader :flow_directions + # Unique identifier for the object. + attr_reader :id + # The error encountered in the previous SetupIntent confirmation. + attr_reader :last_setup_error + # The most recent SetupAttempt for this SetupIntent. + attr_reader :latest_attempt + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # ID of the multi use Mandate generated by the SetupIntent. + attr_reader :mandate + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + attr_reader :next_action + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) for which the setup is intended. + attr_reader :on_behalf_of + # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + attr_reader :payment_method + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + attr_reader :payment_method_configuration_details + # Payment method-specific configuration for this SetupIntent. + attr_reader :payment_method_options + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + attr_reader :payment_method_types + # ID of the single_use Mandate generated by the SetupIntent. + attr_reader :single_use_mandate + # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + attr_reader :status + # Indicates how the payment method is intended to be used in the future. + # + # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + attr_reader :usage + # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. # # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. @@ -112,8 +266,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of SetupIntents. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/setup_intents", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/setup_intents", params: params, opts: opts) end # Updates a SetupIntent object. diff --git a/lib/stripe/resources/shipping_rate.rb b/lib/stripe/resources/shipping_rate.rb index 16a850fa9..9d0b485b8 100644 --- a/lib/stripe/resources/shipping_rate.rb +++ b/lib/stripe/resources/shipping_rate.rb @@ -14,14 +14,56 @@ def self.object_name "shipping_rate" end + class DeliveryEstimate < Stripe::StripeObject + class Maximum < Stripe::StripeObject + attr_reader :unit, :value + end + + class Minimum < Stripe::StripeObject + attr_reader :unit, :value + end + attr_reader :maximum, :minimum + end + + class FixedAmount < Stripe::StripeObject + class CurrencyOptions < Stripe::StripeObject + attr_reader :amount, :tax_behavior + end + attr_reader :amount, :currency, :currency_options + end + # Whether the shipping rate can be used for new purchases. Defaults to `true`. + attr_reader :active + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_reader :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_reader :display_name + # Attribute for field fixed_amount + attr_reader :fixed_amount + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_reader :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_reader :tax_code + # The type of calculation to use on the shipping rate. + attr_reader :type + # Creates a new shipping rate object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/shipping_rates", params: params, opts: opts) end # Returns a list of your shipping rates. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/shipping_rates", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/shipping_rates", params: params, opts: opts) end # Updates an existing shipping rate object. diff --git a/lib/stripe/resources/sigma/scheduled_query_run.rb b/lib/stripe/resources/sigma/scheduled_query_run.rb index b5626aa8f..83c734101 100644 --- a/lib/stripe/resources/sigma/scheduled_query_run.rb +++ b/lib/stripe/resources/sigma/scheduled_query_run.rb @@ -15,12 +15,38 @@ def self.object_name "scheduled_query_run" end + class Error < Stripe::StripeObject + attr_reader :message + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # When the query was run, Sigma contained a snapshot of your Stripe data at this time. + attr_reader :data_load_time + # Attribute for field error + attr_reader :error + # The file object representing the results of the query. + attr_reader :file + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Time at which the result expires and is no longer available for download. + attr_reader :result_available_until + # SQL for the query. + attr_reader :sql + # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + attr_reader :status + # Title of the query. + attr_reader :title + # Returns a list of scheduled query runs. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/sigma/scheduled_query_runs", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/source.rb b/lib/stripe/resources/source.rb index 0ba0009e8..d6e752320 100644 --- a/lib/stripe/resources/source.rb +++ b/lib/stripe/resources/source.rb @@ -24,6 +24,201 @@ def self.object_name nested_resource_class_methods :source_transaction, operations: %i[retrieve list] + class AchCreditTransfer < Stripe::StripeObject + attr_reader :account_number, :bank_name, :fingerprint, :refund_account_holder_name, :refund_account_holder_type, :refund_routing_number, :routing_number, :swift_code + end + + class AchDebit < Stripe::StripeObject + attr_reader :bank_name, :country, :fingerprint, :last4, :routing_number, :type + end + + class AcssDebit < Stripe::StripeObject + attr_reader :bank_address_city, :bank_address_line_1, :bank_address_line_2, :bank_address_postal_code, :bank_name, :category, :country, :fingerprint, :last4, :routing_number + end + + class Alipay < Stripe::StripeObject + attr_reader :data_string, :native_url, :statement_descriptor + end + + class AuBecsDebit < Stripe::StripeObject + attr_reader :bsb_number, :fingerprint, :last4 + end + + class Bancontact < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :iban_last4, :preferred_language, :statement_descriptor + end + + class Card < Stripe::StripeObject + attr_reader :address_line1_check, :address_zip_check, :brand, :country, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method + end + + class CardPresent < Stripe::StripeObject + attr_reader :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :brand, :country, :cvm_type, :data_type, :dedicated_file_name, :description, :emv_auth_data, :evidence_customer_signature, :evidence_transaction_certificate, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :pos_device_id, :pos_entry_mode, :read_method, :reader, :terminal_verification_results, :transaction_status_information + end + + class CodeVerification < Stripe::StripeObject + attr_reader :attempts_remaining, :status + end + + class Eps < Stripe::StripeObject + attr_reader :reference, :statement_descriptor + end + + class Giropay < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :statement_descriptor + end + + class Ideal < Stripe::StripeObject + attr_reader :bank, :bic, :iban_last4, :statement_descriptor + end + + class Klarna < Stripe::StripeObject + attr_reader :background_image_url, :client_token, :first_name, :last_name, :locale, :logo_url, :page_title, :pay_later_asset_urls_descriptive, :pay_later_asset_urls_standard, :pay_later_name, :pay_later_redirect_url, :pay_now_asset_urls_descriptive, :pay_now_asset_urls_standard, :pay_now_name, :pay_now_redirect_url, :pay_over_time_asset_urls_descriptive, :pay_over_time_asset_urls_standard, :pay_over_time_name, :pay_over_time_redirect_url, :payment_method_categories, :purchase_country, :purchase_type, :redirect_url, :shipping_delay, :shipping_first_name, :shipping_last_name + end + + class Multibanco < Stripe::StripeObject + attr_reader :entity, :reference, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban + end + + class Owner < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class VerifiedAddress < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name, :phone, :verified_address, :verified_email, :verified_name, :verified_phone + end + + class P24 < Stripe::StripeObject + attr_reader :reference + end + + class Paypal < Stripe::StripeObject + attr_reader :billing_agreement, :fingerprint, :payer_id, :reference_id, :reference_transaction_amount, :reference_transaction_charged, :statement_descriptor, :transaction_id, :verified_email + end + + class Receiver < Stripe::StripeObject + attr_reader :address, :amount_charged, :amount_received, :amount_returned, :refund_attributes_method, :refund_attributes_status + end + + class Redirect < Stripe::StripeObject + attr_reader :failure_reason, :return_url, :status, :url + end + + class SepaCreditTransfer < Stripe::StripeObject + attr_reader :bank_name, :bic, :iban, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban + end + + class SepaDebit < Stripe::StripeObject + attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate_reference, :mandate_url + end + + class Sofort < Stripe::StripeObject + attr_reader :bank_code, :bank_name, :bic, :country, :iban_last4, :preferred_language, :statement_descriptor + end + + class SourceOrder < Stripe::StripeObject + class Item < Stripe::StripeObject + attr_reader :amount, :currency, :description, :parent, :quantity, :type + end + + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number + end + attr_reader :amount, :currency, :email, :items, :shipping + end + + class ThreeDSecure < Stripe::StripeObject + attr_reader :address_line1_check, :address_zip_check, :authenticated, :brand, :card, :country, :customer, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method + end + + class Wechat < Stripe::StripeObject + attr_reader :prepay_id, :qr_code_url, :statement_descriptor + end + # Attribute for field ach_credit_transfer + attr_reader :ach_credit_transfer + # Attribute for field ach_debit + attr_reader :ach_debit + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field alipay + attr_reader :alipay + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + attr_reader :amount + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # The client secret of the source. Used for client-side retrieval using a publishable key. + attr_reader :client_secret + # Attribute for field code_verification + attr_reader :code_verification + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + attr_reader :currency + # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + attr_reader :customer + # Attribute for field eps + attr_reader :eps + # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + attr_reader :flow + # Attribute for field giropay + attr_reader :giropay + # Unique identifier for the object. + attr_reader :id + # Attribute for field ideal + attr_reader :ideal + # Attribute for field klarna + attr_reader :klarna + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Attribute for field multibanco + attr_reader :multibanco + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Information about the owner of the payment instrument that may be used or required by particular source types. + attr_reader :owner + # Attribute for field p24 + attr_reader :p24 + # Attribute for field paypal + attr_reader :paypal + # Attribute for field receiver + attr_reader :receiver + # Attribute for field redirect + attr_reader :redirect + # Attribute for field sepa_credit_transfer + attr_reader :sepa_credit_transfer + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # Attribute for field source_order + attr_reader :source_order + # Extra information about a source. This will appear on your customer's statement every time you charge the source. + attr_reader :statement_descriptor + # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + attr_reader :status + # Attribute for field three_d_secure + attr_reader :three_d_secure + # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + attr_reader :type + # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + attr_reader :usage + # Attribute for field wechat + attr_reader :wechat + # Creates a new source object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/sources", params: params, opts: opts) diff --git a/lib/stripe/resources/source_transaction.rb b/lib/stripe/resources/source_transaction.rb index 53864e779..028cf0afc 100644 --- a/lib/stripe/resources/source_transaction.rb +++ b/lib/stripe/resources/source_transaction.rb @@ -11,5 +11,53 @@ class SourceTransaction < StripeObject def self.object_name "source_transaction" end + + class AchCreditTransfer < Stripe::StripeObject + attr_reader :customer_data, :fingerprint, :last4, :routing_number + end + + class ChfCreditTransfer < Stripe::StripeObject + attr_reader :reference, :sender_address_country, :sender_address_line1, :sender_iban, :sender_name + end + + class GbpCreditTransfer < Stripe::StripeObject + attr_reader :fingerprint, :funding_method, :last4, :reference, :sender_account_number, :sender_name, :sender_sort_code + end + + class PaperCheck < Stripe::StripeObject + attr_reader :available_at, :invoices + end + + class SepaCreditTransfer < Stripe::StripeObject + attr_reader :reference, :sender_iban, :sender_name + end + # Attribute for field ach_credit_transfer + attr_reader :ach_credit_transfer + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + attr_reader :amount + # Attribute for field chf_credit_transfer + attr_reader :chf_credit_transfer + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field gbp_credit_transfer + attr_reader :gbp_credit_transfer + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field paper_check + attr_reader :paper_check + # Attribute for field sepa_credit_transfer + attr_reader :sepa_credit_transfer + # The ID of the source this transaction is attached to. + attr_reader :source + # The status of the transaction, one of `succeeded`, `pending`, or `failed`. + attr_reader :status + # The type of source this transaction is attached to. + attr_reader :type end end diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index d00880253..106a43153 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -16,6 +16,220 @@ def self.object_name "subscription" end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability + end + + class BillingCycleAnchorConfig < Stripe::StripeObject + attr_reader :day_of_month, :hour, :minute, :month, :second + end + + class BillingThresholds < Stripe::StripeObject + attr_reader :amount_gte, :reset_billing_cycle_anchor + end + + class CancellationDetails < Stripe::StripeObject + attr_reader :comment, :feedback, :reason + end + + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :account_tax_ids, :issuer + end + + class LastPriceMigrationError < Stripe::StripeObject + class FailedTransition < Stripe::StripeObject + attr_reader :source_price, :target_price + end + attr_reader :errored_at, :failed_transitions, :type + end + + class PauseCollection < Stripe::StripeObject + attr_reader :behavior, :resumes_at + end + + class PaymentSettings < Stripe::StripeObject + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :transaction_type + end + attr_reader :mandate_options, :verification_method + end + + class Bancontact < Stripe::StripeObject + attr_reader :preferred_language + end + + class Card < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + attr_reader :amount, :amount_type, :description + end + attr_reader :mandate_options, :network, :request_three_d_secure + end + + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + attr_reader :country + end + attr_reader :eu_bank_transfer, :type + end + attr_reader :bank_transfer, :funding_type + end + + class IdBankTransfer < Stripe::StripeObject; end + class Konbini < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + attr_reader :account_subcategories, :institution + end + attr_reader :filters, :permissions, :prefetch + end + attr_reader :financial_connections, :verification_method + end + attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + end + attr_reader :payment_method_options, :payment_method_types, :save_default_payment_method + end + + class PendingInvoiceItemInterval < Stripe::StripeObject + attr_reader :interval, :interval_count + end + + class PendingUpdate < Stripe::StripeObject + attr_reader :billing_cycle_anchor, :expires_at, :prebilling_iterations, :subscription_items, :trial_end, :trial_from_plan + end + + class Prebilling < Stripe::StripeObject + attr_reader :invoice, :period_end, :period_start, :update_behavior + end + + class TransferData < Stripe::StripeObject + attr_reader :amount_percent, :destination + end + + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + attr_reader :missing_payment_method + end + attr_reader :end_behavior + end + # ID of the Connect Application that created the subscription. + attr_reader :application + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + attr_reader :billing_cycle_anchor + # The fixed values used to calculate the `billing_cycle_anchor`. + attr_reader :billing_cycle_anchor_config + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # A date in the future at which the subscription will automatically get canceled + attr_reader :cancel_at + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + attr_reader :cancel_at_period_end + # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + attr_reader :canceled_at + # Details about why this subscription was cancelled + attr_reader :cancellation_details + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + attr_reader :current_period_end + # Start of the current period that the subscription has been invoiced for. + attr_reader :current_period_start + # ID of the customer who owns the subscription. + attr_reader :customer + # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + attr_reader :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_reader :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_reader :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + attr_reader :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_reader :discount + # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # If the subscription has ended, the date the subscription ended. + attr_reader :ended_at + # Unique identifier for the object. + attr_reader :id + # Attribute for field invoice_settings + attr_reader :invoice_settings + # List of subscription items, each with an attached price. + attr_reader :items + # Details of the most recent price migration that failed for the subscription. + attr_reader :last_price_migration_error + # The most recent invoice this subscription has generated. + attr_reader :latest_invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + attr_reader :next_pending_invoice_item_invoice + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection + # Payment settings passed on to invoices created by the subscription. + attr_reader :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + attr_reader :pending_invoice_item_interval + # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + attr_reader :pending_setup_intent + # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + attr_reader :pending_update + # Time period and invoice for a Subscription billed in advance. + attr_reader :prebilling + # The schedule attached to the subscription + attr_reader :schedule + # Date when the subscription was first created. The date might differ from the `created` date due to backdating. + attr_reader :start_date + # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. + # + # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. + # + # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + # + # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + # + # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). + # + # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + attr_reader :status + # ID of the test clock this subscription belongs to. + attr_reader :test_clock + # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data + # If the subscription has a trial, the end of that trial. + attr_reader :trial_end + # Settings related to subscription trials. + attr_reader :trial_settings + # If the subscription has a trial, the beginning of that trial. + attr_reader :trial_start + # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). # # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. @@ -76,8 +290,8 @@ def self.delete_discount(subscription_exposed_id, params = {}, opts = {}) end # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/subscriptions", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/subscriptions", params: params, opts: opts) end # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. diff --git a/lib/stripe/resources/subscription_item.rb b/lib/stripe/resources/subscription_item.rb index d37a70b2a..96550033b 100644 --- a/lib/stripe/resources/subscription_item.rb +++ b/lib/stripe/resources/subscription_item.rb @@ -21,6 +21,52 @@ def self.object_name operations: %i[list], resource_plural: "usage_record_summaries" + class BillingThresholds < Stripe::StripeObject + attr_reader :usage_gte + end + + class Trial < Stripe::StripeObject + attr_reader :converts_to, :type + end + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + attr_reader :billing_thresholds + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Unique identifier for the object. + attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + # + # Plans define the base price, currency, and billing cycle for recurring purchases of products. + # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + # + # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + attr_reader :plan + # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + # + # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + attr_reader :price + # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + attr_reader :quantity + # The `subscription` this `subscription_item` belongs to. + attr_reader :subscription + # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial + # Always true for a deleted object + attr_reader :deleted + # Adds a new item to an existing subscription. No existing items will be changed or replaced. def self.create(params = {}, opts = {}) request_stripe_object( @@ -52,11 +98,11 @@ def delete(params = {}, opts = {}) end # Returns a list of your subscription items for a given subscription. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/subscription_items", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 01db55ef9..31eda4bf1 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -15,6 +15,159 @@ def self.object_name "subscription_schedule" end + class CurrentPhase < Stripe::StripeObject + attr_reader :end_date, :start_date + end + + class DefaultSettings < Stripe::StripeObject + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability + end + + class BillingThresholds < Stripe::StripeObject + attr_reader :amount_gte, :reset_billing_cycle_anchor + end + + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :account_tax_ids, :days_until_due, :issuer + end + + class TransferData < Stripe::StripeObject + attr_reader :amount_percent, :destination + end + attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data + end + + class LastPriceMigrationError < Stripe::StripeObject + class FailedTransition < Stripe::StripeObject + attr_reader :source_price, :target_price + end + attr_reader :errored_at, :failed_transitions, :type + end + + class Phase < Stripe::StripeObject + class AddInvoiceItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + attr_reader :discounts, :price, :quantity, :tax_rates + end + + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :enabled, :liability + end + + class BillingThresholds < Stripe::StripeObject + attr_reader :amount_gte, :reset_billing_cycle_anchor + end + + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + attr_reader :account, :type + end + attr_reader :account_tax_ids, :days_until_due, :issuer + end + + class Item < Stripe::StripeObject + class BillingThresholds < Stripe::StripeObject + attr_reader :usage_gte + end + + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class Trial < Stripe::StripeObject + attr_reader :converts_to, :type + end + attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial + end + + class PauseCollection < Stripe::StripeObject + attr_reader :behavior + end + + class TransferData < Stripe::StripeObject + attr_reader :amount_percent, :destination + end + + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + attr_reader :prorate_up_front + end + attr_reader :end_behavior + end + attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings + end + + class Prebilling < Stripe::StripeObject + attr_reader :invoice, :period_end, :period_start, :update_behavior + end + # ID of the Connect Application that created the schedule. + attr_reader :application + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + attr_reader :completed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + attr_reader :current_phase + # ID of the customer who owns the subscription schedule. + attr_reader :customer + # Attribute for field default_settings + attr_reader :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_reader :end_behavior + # Unique identifier for the object. + attr_reader :id + # Details of the most recent price migration that failed for the subscription schedule. + attr_reader :last_price_migration_error + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Configuration for the subscription schedule's phases. + attr_reader :phases + # Time period and invoice for a Subscription billed in advance. + attr_reader :prebilling + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + attr_reader :released_at + # ID of the subscription once managed by the subscription schedule (if it is released). + attr_reader :released_subscription + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + attr_reader :status + # ID of the subscription managed by the subscription schedule. + attr_reader :subscription + # ID of the test clock this subscription schedule belongs to. + attr_reader :test_clock + # Amends an existing subscription schedule. def amend(params = {}, opts = {}) request_stripe_object( @@ -66,11 +219,11 @@ def self.create(params = {}, opts = {}) end # Retrieves the list of your subscription schedules. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/subscription_schedules", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/tax/association.rb b/lib/stripe/resources/tax/association.rb index 1edd114d0..7c2d100d1 100644 --- a/lib/stripe/resources/tax/association.rb +++ b/lib/stripe/resources/tax/association.rb @@ -10,6 +10,42 @@ def self.object_name "tax.association" end + class StatusDetails < Stripe::StripeObject + class Committed < Stripe::StripeObject + class Reversal < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + class Committed < Stripe::StripeObject + attr_reader :transaction + end + + class Errored < Stripe::StripeObject + attr_reader :reason, :refund_id + end + attr_reader :committed, :errored + end + attr_reader :status, :status_details + end + attr_reader :reversals, :transaction + end + + class Errored < Stripe::StripeObject + attr_reader :reason + end + attr_reader :committed, :errored + end + # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. + attr_reader :calculation + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. + attr_reader :payment_intent + # Status of the Tax Association. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details + # Finds a tax association object by PaymentIntent id. def self.find(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index 99cd00e65..78abe4454 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -14,6 +14,78 @@ def self.object_name "tax.calculation" end + class CustomerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class TaxId < Stripe::StripeObject + attr_reader :type, :value + end + attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override + end + + class ShipFromDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address + end + + class ShippingCost < Stripe::StripeObject + class TaxBreakdown < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + attr_reader :country, :display_name, :level, :state + end + + class TaxRateDetails < Stripe::StripeObject + attr_reader :display_name, :percentage_decimal, :tax_type + end + attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + end + attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code + end + + class TaxBreakdown < Stripe::StripeObject + class TaxRateDetails < Stripe::StripeObject + class FlatAmount < Stripe::StripeObject + attr_reader :amount, :currency + end + attr_reader :country, :flat_amount, :percentage_decimal, :rate_type, :state, :tax_type + end + attr_reader :amount, :inclusive, :tax_rate_details, :taxability_reason, :taxable_amount + end + # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_total + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + attr_reader :customer + # Attribute for field customer_details + attr_reader :customer_details + # Timestamp of date at which the tax calculation will expire. + attr_reader :expires_at + # Unique identifier for the calculation. + attr_reader :id + # The list of items the customer is purchasing. + attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The details of the ship from location, such as the address. + attr_reader :ship_from_details + # The shipping cost details for the calculation. + attr_reader :shipping_cost + # The amount of tax to be collected on top of the line item prices. + attr_reader :tax_amount_exclusive + # The amount of tax already included in the line item prices. + attr_reader :tax_amount_inclusive + # Breakdown of individual tax amounts that add up to the total. + attr_reader :tax_breakdown + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + attr_reader :tax_date + # Calculates tax based on the input and returns a Tax Calculation object. def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/tax/calculation_line_item.rb b/lib/stripe/resources/tax/calculation_line_item.rb index 1dbcdc73d..ebaf3d4ff 100644 --- a/lib/stripe/resources/tax/calculation_line_item.rb +++ b/lib/stripe/resources/tax/calculation_line_item.rb @@ -8,6 +8,39 @@ class CalculationLineItem < APIResource def self.object_name "tax.calculation_line_item" end + + class TaxBreakdown < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + attr_reader :country, :display_name, :level, :state + end + + class TaxRateDetails < Stripe::StripeObject + attr_reader :display_name, :percentage_decimal, :tax_type + end + attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + end + # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + attr_reader :product + # The number of units of the item being purchased. For reversals, this is the quantity reversed. + attr_reader :quantity + # A custom identifier for this line item. + attr_reader :reference + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + # Detailed account of taxes relevant to this line item. + attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + attr_reader :tax_code end end end diff --git a/lib/stripe/resources/tax/form.rb b/lib/stripe/resources/tax/form.rb index 58bd83f9f..937d783cf 100644 --- a/lib/stripe/resources/tax/form.rb +++ b/lib/stripe/resources/tax/form.rb @@ -14,9 +14,84 @@ def self.object_name "tax.form" end + class AuSerr < Stripe::StripeObject + attr_reader :reporting_period_end_date, :reporting_period_start_date + end + + class CaMrdp < Stripe::StripeObject + attr_reader :reporting_period_end_date, :reporting_period_start_date + end + + class EuDac7 < Stripe::StripeObject + attr_reader :reporting_period_end_date, :reporting_period_start_date + end + + class FilingStatus < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + attr_reader :country, :level, :state + end + attr_reader :effective_at, :jurisdiction, :value + end + + class GbMrdp < Stripe::StripeObject + attr_reader :reporting_period_end_date, :reporting_period_start_date + end + + class NzMrdp < Stripe::StripeObject + attr_reader :reporting_period_end_date, :reporting_period_start_date + end + + class Payee < Stripe::StripeObject + attr_reader :account, :external_reference, :type + end + + class Us1099K < Stripe::StripeObject + attr_reader :reporting_year + end + + class Us1099Misc < Stripe::StripeObject + attr_reader :reporting_year + end + + class Us1099Nec < Stripe::StripeObject + attr_reader :reporting_year + end + # Attribute for field au_serr + attr_reader :au_serr + # Attribute for field ca_mrdp + attr_reader :ca_mrdp + # The form that corrects this form, if any. + attr_reader :corrected_by + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Attribute for field eu_dac7 + attr_reader :eu_dac7 + # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. + attr_reader :filing_statuses + # Attribute for field gb_mrdp + attr_reader :gb_mrdp + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Attribute for field nz_mrdp + attr_reader :nz_mrdp + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field payee + attr_reader :payee + # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. + attr_reader :type + # Attribute for field us_1099_k + attr_reader :us_1099_k + # Attribute for field us_1099_misc + attr_reader :us_1099_misc + # Attribute for field us_1099_nec + attr_reader :us_1099_nec + # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax/forms", params: params, opts: opts) end # Download the PDF for a tax form. diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb index 6055c4f5d..78d8d48e2 100644 --- a/lib/stripe/resources/tax/registration.rb +++ b/lib/stripe/resources/tax/registration.rb @@ -18,6 +18,385 @@ def self.object_name "tax.registration" end + class CountryOptions < Stripe::StripeObject + class Ae < Stripe::StripeObject + attr_reader :type + end + + class At < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Au < Stripe::StripeObject + attr_reader :type + end + + class Be < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Bg < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Bh < Stripe::StripeObject + attr_reader :type + end + + class By < Stripe::StripeObject + attr_reader :type + end + + class Ca < Stripe::StripeObject + class ProvinceStandard < Stripe::StripeObject + attr_reader :province + end + attr_reader :province_standard, :type + end + + class Ch < Stripe::StripeObject + attr_reader :type + end + + class Cl < Stripe::StripeObject + attr_reader :type + end + + class Co < Stripe::StripeObject + attr_reader :type + end + + class Cr < Stripe::StripeObject + attr_reader :type + end + + class Cy < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Cz < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class De < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Dk < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Ec < Stripe::StripeObject + attr_reader :type + end + + class Ee < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Eg < Stripe::StripeObject + attr_reader :type + end + + class Es < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Fi < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Fr < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Gb < Stripe::StripeObject + attr_reader :type + end + + class Ge < Stripe::StripeObject + attr_reader :type + end + + class Gr < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Hr < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Hu < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Id < Stripe::StripeObject + attr_reader :type + end + + class Ie < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Is < Stripe::StripeObject + attr_reader :type + end + + class It < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Jp < Stripe::StripeObject + attr_reader :type + end + + class Ke < Stripe::StripeObject + attr_reader :type + end + + class Kr < Stripe::StripeObject + attr_reader :type + end + + class Kz < Stripe::StripeObject + attr_reader :type + end + + class Lt < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Lu < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Lv < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Ma < Stripe::StripeObject + attr_reader :type + end + + class Md < Stripe::StripeObject + attr_reader :type + end + + class Mt < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Mx < Stripe::StripeObject + attr_reader :type + end + + class My < Stripe::StripeObject + attr_reader :type + end + + class Ng < Stripe::StripeObject + attr_reader :type + end + + class Nl < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class No < Stripe::StripeObject + attr_reader :type + end + + class Nz < Stripe::StripeObject + attr_reader :type + end + + class Om < Stripe::StripeObject + attr_reader :type + end + + class Pl < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Pt < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Ro < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Rs < Stripe::StripeObject + attr_reader :type + end + + class Ru < Stripe::StripeObject + attr_reader :type + end + + class Sa < Stripe::StripeObject + attr_reader :type + end + + class Se < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Sg < Stripe::StripeObject + attr_reader :type + end + + class Si < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Sk < Stripe::StripeObject + class Standard < Stripe::StripeObject + attr_reader :place_of_supply_scheme + end + attr_reader :standard, :type + end + + class Th < Stripe::StripeObject + attr_reader :type + end + + class Tr < Stripe::StripeObject + attr_reader :type + end + + class Tz < Stripe::StripeObject + attr_reader :type + end + + class Us < Stripe::StripeObject + class LocalAmusementTax < Stripe::StripeObject + attr_reader :jurisdiction + end + + class LocalLeaseTax < Stripe::StripeObject + attr_reader :jurisdiction + end + + class StateSalesTax < Stripe::StripeObject + class Election < Stripe::StripeObject + attr_reader :jurisdiction, :type + end + attr_reader :elections + end + attr_reader :local_amusement_tax, :local_lease_tax, :state, :state_sales_tax, :type + end + + class Uz < Stripe::StripeObject + attr_reader :type + end + + class Vn < Stripe::StripeObject + attr_reader :type + end + + class Za < Stripe::StripeObject + attr_reader :type + end + attr_reader :ae, :at, :au, :be, :bg, :bh, :by, :ca, :ch, :cl, :co, :cr, :cy, :cz, :de, :dk, :ec, :ee, :eg, :es, :fi, :fr, :gb, :ge, :gr, :hr, :hu, :id, :ie, :is, :it, :jp, :ke, :kr, :kz, :lt, :lu, :lv, :ma, :md, :mt, :mx, :my, :ng, :nl, :no, :nz, :om, :pl, :pt, :ro, :rs, :ru, :sa, :se, :sg, :si, :sk, :th, :tr, :tz, :us, :uz, :vn, :za + end + # Time at which the registration becomes active. Measured in seconds since the Unix epoch. + attr_reader :active_from + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Attribute for field country_options + attr_reader :country_options + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + attr_reader :expires_at + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + attr_reader :status + # Creates a new Tax Registration object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -29,11 +408,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Tax Registration objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/tax/registrations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/tax/settings.rb b/lib/stripe/resources/tax/settings.rb index 1250ea35f..d7e9cf3a3 100644 --- a/lib/stripe/resources/tax/settings.rb +++ b/lib/stripe/resources/tax/settings.rb @@ -8,10 +8,43 @@ module Tax # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) class Settings < SingletonAPIResource include Stripe::APIOperations::SingletonSave + OBJECT_NAME = "tax.settings" def self.object_name "tax.settings" end + + class Defaults < Stripe::StripeObject + attr_reader :tax_behavior, :tax_code + end + + class HeadOffice < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address + end + + class StatusDetails < Stripe::StripeObject + class Active < Stripe::StripeObject; end + + class Pending < Stripe::StripeObject + attr_reader :missing_fields + end + attr_reader :active, :pending + end + # Attribute for field defaults + attr_reader :defaults + # The place where your business is located. + attr_reader :head_office + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The status of the Tax `Settings`. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details end end end diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb index bdbfa41d9..c9620bccd 100644 --- a/lib/stripe/resources/tax/transaction.rb +++ b/lib/stripe/resources/tax/transaction.rb @@ -12,6 +12,74 @@ def self.object_name "tax.transaction" end + class CustomerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + + class TaxId < Stripe::StripeObject + attr_reader :type, :value + end + attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override + end + + class Reversal < Stripe::StripeObject + attr_reader :original_transaction + end + + class ShipFromDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address + end + + class ShippingCost < Stripe::StripeObject + class TaxBreakdown < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + attr_reader :country, :display_name, :level, :state + end + + class TaxRateDetails < Stripe::StripeObject + attr_reader :display_name, :percentage_decimal, :tax_type + end + attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + end + attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + attr_reader :customer + # Attribute for field customer_details + attr_reader :customer_details + # Unique identifier for the transaction. + attr_reader :id + # The tax collected or refunded, by line item. + attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The Unix timestamp representing when the tax liability is assumed or reduced. + attr_reader :posted_at + # A custom unique identifier, such as 'myOrder_123'. + attr_reader :reference + # If `type=reversal`, contains information about what was reversed. + attr_reader :reversal + # The details of the ship from location, such as the address. + attr_reader :ship_from_details + # The shipping cost details for the transaction. + attr_reader :shipping_cost + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + attr_reader :tax_date + # If `reversal`, this transaction reverses an earlier transaction. + attr_reader :type + # Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. def self.create_from_calculation(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/tax/transaction_line_item.rb b/lib/stripe/resources/tax/transaction_line_item.rb index b0d8face8..0ccae0f7d 100644 --- a/lib/stripe/resources/tax/transaction_line_item.rb +++ b/lib/stripe/resources/tax/transaction_line_item.rb @@ -8,6 +8,36 @@ class TransactionLineItem < APIResource def self.object_name "tax.transaction_line_item" end + + class Reversal < Stripe::StripeObject + attr_reader :original_line_item + end + # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + attr_reader :product + # The number of units of the item being purchased. For reversals, this is the quantity reversed. + attr_reader :quantity + # A custom identifier for this line item in the transaction. + attr_reader :reference + # If `type=reversal`, contains information about what was reversed. + attr_reader :reversal + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + attr_reader :tax_code + # If `reversal`, this line item reverses an earlier transaction. + attr_reader :type end end end diff --git a/lib/stripe/resources/tax_code.rb b/lib/stripe/resources/tax_code.rb index ad9b321d6..acec3dcb6 100644 --- a/lib/stripe/resources/tax_code.rb +++ b/lib/stripe/resources/tax_code.rb @@ -11,9 +11,18 @@ def self.object_name "tax_code" end + # A detailed description of which types of products the tax code represents. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # A short name for the tax code. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_codes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_codes", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb index 6ce2a98ff..aef3c5fb6 100644 --- a/lib/stripe/resources/tax_id.rb +++ b/lib/stripe/resources/tax_id.rb @@ -16,6 +16,36 @@ def self.object_name "tax_id" end + class Owner < Stripe::StripeObject + attr_reader :account, :application, :customer, :type + end + + class Verification < Stripe::StripeObject + attr_reader :status, :verified_address, :verified_name + end + # Two-letter ISO code representing the country of the tax ID. + attr_reader :country + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # ID of the customer. + attr_reader :customer + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The account or customer the tax ID belongs to. + attr_reader :owner + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + attr_reader :type + # Value of the tax ID. + attr_reader :value + # Tax ID verification information. + attr_reader :verification + # Always true for a deleted object + attr_reader :deleted + # Creates a new account or customer tax_id object. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/tax_ids", params: params, opts: opts) @@ -42,8 +72,8 @@ def delete(params = {}, opts = {}) end # Returns a list of tax IDs. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_ids", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_ids", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index 54e534d56..c4365423f 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -15,14 +15,56 @@ def self.object_name "tax_rate" end + class FlatAmount < Stripe::StripeObject + attr_reader :amount, :currency + end + # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + attr_reader :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_reader :description + # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + attr_reader :display_name + # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + # this percentage reflects the rate actually used to calculate tax based on the product's taxability + # and whether the user is registered to collect taxes in the corresponding jurisdiction. + attr_reader :effective_percentage + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + attr_reader :flat_amount + # Unique identifier for the object. + attr_reader :id + # This specifies if the tax rate is inclusive or exclusive. + attr_reader :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_reader :jurisdiction + # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + attr_reader :jurisdiction_level + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + attr_reader :percentage + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + attr_reader :rate_type + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type + # Creates a new tax rate. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/tax_rates", params: params, opts: opts) end # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_rates", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_rates", params: params, opts: opts) end # Updates an existing tax rate. diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb index 9ba829037..a98359d19 100644 --- a/lib/stripe/resources/terminal/configuration.rb +++ b/lib/stripe/resources/terminal/configuration.rb @@ -15,6 +15,113 @@ def self.object_name "terminal.configuration" end + class BbposWiseposE < Stripe::StripeObject + attr_reader :splashscreen + end + + class Offline < Stripe::StripeObject + attr_reader :enabled + end + + class RebootWindow < Stripe::StripeObject + attr_reader :end_hour, :start_hour + end + + class StripeS700 < Stripe::StripeObject + attr_reader :splashscreen + end + + class Tipping < Stripe::StripeObject + class Aud < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Cad < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Chf < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Czk < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Dkk < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Eur < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Gbp < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Hkd < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Myr < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Nok < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Nzd < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Pln < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Sek < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Sgd < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + + class Usd < Stripe::StripeObject + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + end + attr_reader :aud, :cad, :chf, :czk, :dkk, :eur, :gbp, :hkd, :myr, :nok, :nzd, :pln, :sek, :sgd, :usd + end + + class VerifoneP400 < Stripe::StripeObject + attr_reader :splashscreen + end + # Attribute for field bbpos_wisepos_e + attr_reader :bbpos_wisepos_e + # Unique identifier for the object. + attr_reader :id + # Whether this Configuration is the default for your account + attr_reader :is_account_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String indicating the name of the Configuration object, set by the user + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field offline + attr_reader :offline + # Attribute for field reboot_window + attr_reader :reboot_window + # Attribute for field stripe_s700 + attr_reader :stripe_s700 + # Attribute for field tipping + attr_reader :tipping + # Attribute for field verifone_p400 + attr_reader :verifone_p400 + # Always true for a deleted object + attr_reader :deleted + # Creates a new Configuration object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -46,11 +153,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Configuration objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/configurations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/terminal/connection_token.rb b/lib/stripe/resources/terminal/connection_token.rb index 3decf1fc2..4ed31ccb2 100644 --- a/lib/stripe/resources/terminal/connection_token.rb +++ b/lib/stripe/resources/terminal/connection_token.rb @@ -14,6 +14,13 @@ def self.object_name "terminal.connection_token" end + # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + attr_reader :location + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Your application should pass this token to the Stripe Terminal SDK. + attr_reader :secret + # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. def self.create(params = {}, opts = {}) request_stripe_object( diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb index 9f4fbccc5..d5824c716 100644 --- a/lib/stripe/resources/terminal/location.rb +++ b/lib/stripe/resources/terminal/location.rb @@ -17,6 +17,26 @@ def self.object_name "terminal.location" end + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + # Attribute for field address + attr_reader :address + # The ID of a configuration that will be used to customize all readers in this location. + attr_reader :configuration_overrides + # The display name of the location. + attr_reader :display_name + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Always true for a deleted object + attr_reader :deleted + # Creates a new Location object. # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. def self.create(params = {}, opts = {}) @@ -49,11 +69,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Location objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/locations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index d33952010..ea7730fb1 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -17,6 +17,124 @@ def self.object_name "terminal.reader" end + class Action < Stripe::StripeObject + class CollectInputs < Stripe::StripeObject + class Input < Stripe::StripeObject + class CustomText < Stripe::StripeObject + attr_reader :description, :skip_button, :submit_button, :title + end + + class Email < Stripe::StripeObject + attr_reader :value + end + + class Numeric < Stripe::StripeObject + attr_reader :value + end + + class Phone < Stripe::StripeObject + attr_reader :value + end + + class Selection < Stripe::StripeObject + class Choice < Stripe::StripeObject + attr_reader :style, :value + end + attr_reader :choices, :value + end + + class Signature < Stripe::StripeObject + attr_reader :value + end + + class Text < Stripe::StripeObject + attr_reader :value + end + + class Toggle < Stripe::StripeObject + attr_reader :default_value, :description, :title, :value + end + attr_reader :custom_text, :email, :numeric, :phone, :required, :selection, :signature, :skipped, :text, :toggles, :type + end + attr_reader :inputs, :metadata + end + + class CollectPaymentMethod < Stripe::StripeObject + class CollectConfig < Stripe::StripeObject + class Tipping < Stripe::StripeObject + attr_reader :amount_eligible + end + attr_reader :enable_customer_cancellation, :skip_tipping, :tipping + end + attr_reader :collect_config, :payment_intent, :payment_method, :stripe_account + end + + class ConfirmPaymentIntent < Stripe::StripeObject + attr_reader :payment_intent, :stripe_account + end + + class ProcessPaymentIntent < Stripe::StripeObject + class ProcessConfig < Stripe::StripeObject + class Tipping < Stripe::StripeObject + attr_reader :amount_eligible + end + attr_reader :enable_customer_cancellation, :skip_tipping, :tipping + end + attr_reader :payment_intent, :process_config, :stripe_account + end + + class ProcessSetupIntent < Stripe::StripeObject + class ProcessConfig < Stripe::StripeObject + attr_reader :enable_customer_cancellation + end + attr_reader :generated_card, :process_config, :setup_intent + end + + class RefundPayment < Stripe::StripeObject + class RefundPaymentConfig < Stripe::StripeObject + attr_reader :enable_customer_cancellation + end + attr_reader :amount, :charge, :metadata, :payment_intent, :reason, :refund, :refund_application_fee, :refund_payment_config, :reverse_transfer, :stripe_account + end + + class SetReaderDisplay < Stripe::StripeObject + class Cart < Stripe::StripeObject + class LineItem < Stripe::StripeObject + attr_reader :amount, :description, :quantity + end + attr_reader :currency, :line_items, :tax, :total + end + attr_reader :cart, :type + end + attr_reader :collect_inputs, :collect_payment_method, :confirm_payment_intent, :failure_code, :failure_message, :process_payment_intent, :process_setup_intent, :refund_payment, :set_reader_display, :status, :type + end + # The most recent action performed by the reader. + attr_reader :action + # The current software version of the reader. + attr_reader :device_sw_version + # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. + attr_reader :device_type + # Unique identifier for the object. + attr_reader :id + # The local IP address of the reader. + attr_reader :ip_address + # Custom label given to the reader for easier identification. + attr_reader :label + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The location identifier of the reader. + attr_reader :location + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Serial number of the reader. + attr_reader :serial_number + # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + attr_reader :status + # Always true for a deleted object + attr_reader :deleted + # Cancels the current reader action. def cancel_action(params = {}, opts = {}) request_stripe_object( @@ -128,11 +246,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Reader objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/readers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/terminal/reader_collected_data.rb b/lib/stripe/resources/terminal/reader_collected_data.rb index 8a9ebe146..4f9d1afaa 100644 --- a/lib/stripe/resources/terminal/reader_collected_data.rb +++ b/lib/stripe/resources/terminal/reader_collected_data.rb @@ -9,6 +9,22 @@ class ReaderCollectedData < APIResource def self.object_name "terminal.reader_collected_data" end + + class Magstripe < Stripe::StripeObject + attr_reader :data + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The magstripe data collected by the reader. + attr_reader :magstripe + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The type of data collected by the reader. + attr_reader :type end end end diff --git a/lib/stripe/resources/test_helpers/test_clock.rb b/lib/stripe/resources/test_helpers/test_clock.rb index 31b49a059..c020c4530 100644 --- a/lib/stripe/resources/test_helpers/test_clock.rb +++ b/lib/stripe/resources/test_helpers/test_clock.rb @@ -16,6 +16,33 @@ def self.object_name "test_helpers.test_clock" end + class StatusDetails < Stripe::StripeObject + class Advancing < Stripe::StripeObject + attr_reader :target_frozen_time + end + attr_reader :advancing + end + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Time at which this clock is scheduled to auto delete. + attr_reader :deletes_after + # Time at which all objects belonging to this clock are frozen. + attr_reader :frozen_time + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The custom name supplied at creation. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The status of the Test Clock. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details + # Always true for a deleted object + attr_reader :deleted + # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. def advance(params = {}, opts = {}) request_stripe_object( @@ -67,11 +94,11 @@ def delete(params = {}, opts = {}) end # Returns a list of your test clocks. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/test_helpers/test_clocks", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index ffef36deb..afa3ab24e 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -30,6 +30,35 @@ def self.object_name "token" end + # These bank accounts are payment methods on `Customer` objects. + # + # On the other hand [External Accounts](/api#external_accounts) are transfer + # destinations on `Account` objects for connected accounts. + # They can be bank accounts or debit cards as well, and are documented in the links above. + # + # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + attr_reader :bank_account + # You can store multiple cards on a customer in order to charge the customer + # later. You can also store multiple debit cards on a recipient in order to + # transfer to those cards later. + # + # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + attr_reader :card + # IP address of the client that generates the token. + attr_reader :client_ip + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Type of the token: `account`, `bank_account`, `card`, or `pii`. + attr_reader :type + # Determines if you have already used this token (you can only use tokens once). + attr_reader :used + # Creates a single-use token that represents a bank account's details. # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. def self.create(params = {}, opts = {}) diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb index 53ef333d2..dd58dcb50 100644 --- a/lib/stripe/resources/topup.rb +++ b/lib/stripe/resources/topup.rb @@ -17,6 +17,39 @@ def self.object_name "topup" end + # Amount transferred. + attr_reader :amount + # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + attr_reader :expected_availability_date + # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + attr_reader :failure_code + # Message to user further explaining reason for top-up failure if available. + attr_reader :failure_message + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The source field is deprecated. It might not always be present in the API response. + attr_reader :source + # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + attr_reader :statement_descriptor + # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + attr_reader :status + # A string that identifies this top-up as part of a group. + attr_reader :transfer_group + # Cancels a top-up. Only pending top-ups can be canceled. def cancel(params = {}, opts = {}) request_stripe_object( @@ -43,8 +76,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of top-ups. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/topups", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/topups", params: params, opts: opts) end # Updates the metadata of a top-up. Other top-up details are not editable by design. diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb index 476be51fd..5940dc20c 100644 --- a/lib/stripe/resources/transfer.rb +++ b/lib/stripe/resources/transfer.rb @@ -25,14 +25,49 @@ def self.object_name nested_resource_class_methods :reversal, operations: %i[create retrieve update list] + # Amount in cents (or local equivalent) to be transferred. + attr_reader :amount + # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + attr_reader :amount_reversed + # Balance transaction that describes the impact of this transfer on your account balance. + attr_reader :balance_transaction + # Time that this record of the transfer was first created. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # ID of the Stripe account the transfer was sent to. + attr_reader :destination + # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + attr_reader :destination_payment + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # A list of reversals that have been applied to the transfer. + attr_reader :reversals + # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + attr_reader :reversed + # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + attr_reader :source_transaction + # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + attr_reader :source_type + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_reader :transfer_group + # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/transfers", params: params, opts: opts) end # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/transfers", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/transfers", params: params, opts: opts) end # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/lib/stripe/resources/treasury/credit_reversal.rb b/lib/stripe/resources/treasury/credit_reversal.rb index ad3ea0bd6..f0c09f07e 100644 --- a/lib/stripe/resources/treasury/credit_reversal.rb +++ b/lib/stripe/resources/treasury/credit_reversal.rb @@ -13,6 +13,38 @@ def self.object_name "treasury.credit_reversal" end + class StatusTransitions < Stripe::StripeObject + attr_reader :posted_at + end + # Amount (in cents) transferred. + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The FinancialAccount to reverse funds from. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The rails used to reverse the funds. + attr_reader :network + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ReceivedCredit being reversed. + attr_reader :received_credit + # Status of the CreditReversal + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # The Transaction associated with this object. + attr_reader :transaction + # Reverses a ReceivedCredit and creates a CreditReversal object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -24,11 +56,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of CreditReversals. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/credit_reversals", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/debit_reversal.rb b/lib/stripe/resources/treasury/debit_reversal.rb index 0021ad438..e1c82a58c 100644 --- a/lib/stripe/resources/treasury/debit_reversal.rb +++ b/lib/stripe/resources/treasury/debit_reversal.rb @@ -13,6 +13,44 @@ def self.object_name "treasury.debit_reversal" end + class LinkedFlows < Stripe::StripeObject + attr_reader :issuing_dispute + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :completed_at + end + # Amount (in cents) transferred. + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The FinancialAccount to reverse funds from. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Other flows linked to a DebitReversal. + attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The rails used to reverse the funds. + attr_reader :network + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The ReceivedDebit being reversed. + attr_reader :received_debit + # Status of the DebitReversal + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # The Transaction associated with this object. + attr_reader :transaction + # Reverses a ReceivedDebit and creates a DebitReversal object. def self.create(params = {}, opts = {}) request_stripe_object( @@ -24,11 +62,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of DebitReversals. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/debit_reversals", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb index 22cdfa831..18eabd667 100644 --- a/lib/stripe/resources/treasury/financial_account.rb +++ b/lib/stripe/resources/treasury/financial_account.rb @@ -15,6 +15,63 @@ def self.object_name "treasury.financial_account" end + class Balance < Stripe::StripeObject + attr_reader :cash, :inbound_pending, :outbound_pending + end + + class FinancialAddress < Stripe::StripeObject + class Aba < Stripe::StripeObject + attr_reader :account_holder_name, :account_number, :account_number_last4, :bank_name, :routing_number + end + attr_reader :aba, :supported_networks, :type + end + + class PlatformRestrictions < Stripe::StripeObject + attr_reader :inbound_flows, :outbound_flows + end + + class StatusDetails < Stripe::StripeObject + class Closed < Stripe::StripeObject + attr_reader :reasons + end + attr_reader :closed + end + # The array of paths to active Features in the Features hash. + attr_reader :active_features + # Balance information for the FinancialAccount + attr_reader :balance + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + attr_reader :display_name + # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + # Stripe or the platform can control Features via the requested field. + attr_reader :features + # The set of credentials that resolve to a FinancialAccount. + attr_reader :financial_addresses + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The array of paths to pending Features in the Features hash. + attr_reader :pending_features + # The set of functionalities that the platform can restrict on the FinancialAccount. + attr_reader :platform_restrictions + # The array of paths to restricted Features in the Features hash. + attr_reader :restricted_features + # Status of this FinancialAccount. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details + # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + attr_reader :supported_currencies + # Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount. def self.create(params = {}, opts = {}) request_stripe_object( @@ -26,11 +83,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of FinancialAccounts. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/financial_accounts", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/financial_account_features.rb b/lib/stripe/resources/treasury/financial_account_features.rb index e8849b8ef..716dab225 100644 --- a/lib/stripe/resources/treasury/financial_account_features.rb +++ b/lib/stripe/resources/treasury/financial_account_features.rb @@ -10,6 +10,97 @@ class FinancialAccountFeatures < APIResource def self.object_name "treasury.financial_account_features" end + + class CardIssuing < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + + class DepositInsurance < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + + class FinancialAddresses < Stripe::StripeObject + class Aba < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :bank, :requested, :status, :status_details + end + attr_reader :aba + end + + class InboundTransfers < Stripe::StripeObject + class Ach < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + attr_reader :ach + end + + class IntraStripeFlows < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + + class OutboundPayments < Stripe::StripeObject + class Ach < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + + class UsDomesticWire < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + attr_reader :ach, :us_domestic_wire + end + + class OutboundTransfers < Stripe::StripeObject + class Ach < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + + class UsDomesticWire < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + attr_reader :code, :resolution, :restriction + end + attr_reader :requested, :status, :status_details + end + attr_reader :ach, :us_domestic_wire + end + # Toggle settings for enabling/disabling a feature + attr_reader :card_issuing + # Toggle settings for enabling/disabling a feature + attr_reader :deposit_insurance + # Settings related to Financial Addresses features on a Financial Account + attr_reader :financial_addresses + # InboundTransfers contains inbound transfers features for a FinancialAccount. + attr_reader :inbound_transfers + # Toggle settings for enabling/disabling a feature + attr_reader :intra_stripe_flows + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Settings related to Outbound Payments features on a Financial Account + attr_reader :outbound_payments + # OutboundTransfers contains outbound transfers features for a FinancialAccount. + attr_reader :outbound_transfers end end end diff --git a/lib/stripe/resources/treasury/inbound_transfer.rb b/lib/stripe/resources/treasury/inbound_transfer.rb index ed8c70ff6..3f94429a5 100644 --- a/lib/stripe/resources/treasury/inbound_transfer.rb +++ b/lib/stripe/resources/treasury/inbound_transfer.rb @@ -15,6 +15,72 @@ def self.object_name "treasury.inbound_transfer" end + class FailureDetails < Stripe::StripeObject + attr_reader :code + end + + class LinkedFlows < Stripe::StripeObject + attr_reader :received_debit + end + + class OriginPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name + end + + class UsBankAccount < Stripe::StripeObject + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + end + attr_reader :billing_details, :type, :us_bank_account + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :canceled_at, :failed_at, :succeeded_at + end + # Amount (in cents) transferred. + attr_reader :amount + # Returns `true` if the InboundTransfer is able to be canceled. + attr_reader :cancelable + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Details about this InboundTransfer's failure. Only set when status is `failed`. + attr_reader :failure_details + # The FinancialAccount that received the funds. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Attribute for field linked_flows + attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The origin payment method to be debited for an InboundTransfer. + attr_reader :origin_payment_method + # Details about the PaymentMethod for an InboundTransfer. + attr_reader :origin_payment_method_details + # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + attr_reader :returned + # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. + attr_reader :statement_descriptor + # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # The Transaction associated with this object. + attr_reader :transaction + # Cancels an InboundTransfer. def cancel(params = {}, opts = {}) request_stripe_object( @@ -46,11 +112,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of InboundTransfers sent from the specified FinancialAccount. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/inbound_transfers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/outbound_payment.rb b/lib/stripe/resources/treasury/outbound_payment.rb index dd61f55d5..ab9dc82b2 100644 --- a/lib/stripe/resources/treasury/outbound_payment.rb +++ b/lib/stripe/resources/treasury/outbound_payment.rb @@ -17,6 +17,91 @@ def self.object_name "treasury.outbound_payment" end + class DestinationPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name + end + + class FinancialAccount < Stripe::StripeObject + attr_reader :id, :network + end + + class UsBankAccount < Stripe::StripeObject + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + end + attr_reader :billing_details, :financial_account, :type, :us_bank_account + end + + class EndUserDetails < Stripe::StripeObject + attr_reader :ip_address, :present + end + + class ReturnedDetails < Stripe::StripeObject + attr_reader :code, :transaction + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :canceled_at, :failed_at, :posted_at, :returned_at + end + + class TrackingDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + attr_reader :trace_id + end + + class UsDomesticWire < Stripe::StripeObject + attr_reader :chips, :imad, :omad + end + attr_reader :ach, :type, :us_domestic_wire + end + # Amount (in cents) transferred. + attr_reader :amount + # Returns `true` if the object can be canceled, and `false` otherwise. + attr_reader :cancelable + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + attr_reader :destination_payment_method + # Details about the PaymentMethod for an OutboundPayment. + attr_reader :destination_payment_method_details + # Details about the end user. + attr_reader :end_user_details + # The date when funds are expected to arrive in the destination account. + attr_reader :expected_arrival_date + # The FinancialAccount that funds were pulled from. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Details about a returned OutboundPayment. Only set when the status is `returned`. + attr_reader :returned_details + # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + attr_reader :statement_descriptor + # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # Details about network-specific tracking information if available. + attr_reader :tracking_details + # The Transaction associated with this object. + attr_reader :transaction + # Cancel an OutboundPayment. def cancel(params = {}, opts = {}) request_stripe_object( @@ -48,11 +133,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of OutboundPayments sent from the specified FinancialAccount. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_payments", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/outbound_transfer.rb b/lib/stripe/resources/treasury/outbound_transfer.rb index a5ed090df..cc0f6a3bd 100644 --- a/lib/stripe/resources/treasury/outbound_transfer.rb +++ b/lib/stripe/resources/treasury/outbound_transfer.rb @@ -17,6 +17,88 @@ def self.object_name "treasury.outbound_transfer" end + class DestinationPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name + end + + class UsBankAccount < Stripe::StripeObject + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + end + attr_reader :billing_details, :type, :us_bank_account + end + + class NetworkDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + attr_reader :addenda + end + attr_reader :ach, :type + end + + class ReturnedDetails < Stripe::StripeObject + attr_reader :code, :transaction + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :canceled_at, :failed_at, :posted_at, :returned_at + end + + class TrackingDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + attr_reader :trace_id + end + + class UsDomesticWire < Stripe::StripeObject + attr_reader :chips, :imad, :omad + end + attr_reader :ach, :type, :us_domestic_wire + end + # Amount (in cents) transferred. + attr_reader :amount + # Returns `true` if the object can be canceled, and `false` otherwise. + attr_reader :cancelable + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # The PaymentMethod used as the payment instrument for an OutboundTransfer. + attr_reader :destination_payment_method + # Attribute for field destination_payment_method_details + attr_reader :destination_payment_method_details + # The date when funds are expected to arrive in the destination account. + attr_reader :expected_arrival_date + # The FinancialAccount that funds were pulled from. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Details about the network used for the OutboundTransfer. + attr_reader :network_details + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Details about a returned OutboundTransfer. Only set when the status is `returned`. + attr_reader :returned_details + # Information about the OutboundTransfer to be sent to the recipient account. + attr_reader :statement_descriptor + # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # Details about network-specific tracking information if available. + attr_reader :tracking_details + # The Transaction associated with this object. + attr_reader :transaction + # An OutboundTransfer can be canceled if the funds have not yet been paid out. def cancel(params = {}, opts = {}) request_stripe_object( @@ -48,11 +130,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of OutboundTransfers sent from the specified FinancialAccount. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_transfers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/received_credit.rb b/lib/stripe/resources/treasury/received_credit.rb index 9445abc96..99ff78eba 100644 --- a/lib/stripe/resources/treasury/received_credit.rb +++ b/lib/stripe/resources/treasury/received_credit.rb @@ -12,12 +12,82 @@ def self.object_name "treasury.received_credit" end + class InitiatingPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name + end + + class FinancialAccount < Stripe::StripeObject + attr_reader :id, :network + end + + class UsBankAccount < Stripe::StripeObject + attr_reader :bank_name, :last4, :routing_number + end + attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account + end + + class LinkedFlows < Stripe::StripeObject + class SourceFlowDetails < Stripe::StripeObject + attr_reader :credit_reversal, :outbound_payment, :payout, :type + end + attr_reader :credit_reversal, :issuing_authorization, :issuing_transaction, :source_flow, :source_flow_details, :source_flow_type + end + + class NetworkDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + attr_reader :addenda + end + attr_reader :ach, :type + end + + class ReversalDetails < Stripe::StripeObject + attr_reader :deadline, :restricted_reason + end + # Amount (in cents) transferred. + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + attr_reader :failure_code + # The FinancialAccount that received the funds. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Attribute for field initiating_payment_method_details + attr_reader :initiating_payment_method_details + # Attribute for field linked_flows + attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The rails used to send the funds. + attr_reader :network + # Details specific to the money movement rails. + attr_reader :network_details + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Details describing when a ReceivedCredit may be reversed. + attr_reader :reversal_details + # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + attr_reader :status + # The Transaction associated with this object. + attr_reader :transaction + # Returns a list of ReceivedCredits. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/received_credits", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/received_debit.rb b/lib/stripe/resources/treasury/received_debit.rb index 8b92213fa..eaeb52fad 100644 --- a/lib/stripe/resources/treasury/received_debit.rb +++ b/lib/stripe/resources/treasury/received_debit.rb @@ -12,12 +12,79 @@ def self.object_name "treasury.received_debit" end + class InitiatingPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :email, :name + end + + class FinancialAccount < Stripe::StripeObject + attr_reader :id, :network + end + + class UsBankAccount < Stripe::StripeObject + attr_reader :bank_name, :last4, :routing_number + end + attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account + end + + class LinkedFlows < Stripe::StripeObject + attr_reader :debit_reversal, :inbound_transfer, :issuing_authorization, :issuing_transaction, :payout, :received_credit_capital_withholding + end + + class NetworkDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + attr_reader :addenda + end + attr_reader :ach, :type + end + + class ReversalDetails < Stripe::StripeObject + attr_reader :deadline, :restricted_reason + end + # Amount (in cents) transferred. + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + attr_reader :failure_code + # The FinancialAccount that funds were pulled from. + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. + attr_reader :id + # Attribute for field initiating_payment_method_details + attr_reader :initiating_payment_method_details + # Attribute for field linked_flows + attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # The network used for the ReceivedDebit. + attr_reader :network + # Details specific to the money movement rails. + attr_reader :network_details + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Details describing when a ReceivedDebit might be reversed. + attr_reader :reversal_details + # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + attr_reader :status + # The Transaction associated with this object. + attr_reader :transaction + # Returns a list of ReceivedDebits. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/received_debits", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/transaction.rb b/lib/stripe/resources/treasury/transaction.rb index c40c42fa6..977072507 100644 --- a/lib/stripe/resources/treasury/transaction.rb +++ b/lib/stripe/resources/treasury/transaction.rb @@ -12,12 +12,54 @@ def self.object_name "treasury.transaction" end + class BalanceImpact < Stripe::StripeObject + attr_reader :cash, :inbound_pending, :outbound_pending + end + + class FlowDetails < Stripe::StripeObject + attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type + end + + class StatusTransitions < Stripe::StripeObject + attr_reader :posted_at, :void_at + end + # Amount (in cents) transferred. + attr_reader :amount + # Change to a FinancialAccount's balance + attr_reader :balance_impact + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + attr_reader :entries + # The FinancialAccount associated with this object. + attr_reader :financial_account + # ID of the flow that created the Transaction. + attr_reader :flow + # Details of the flow that created the Transaction. + attr_reader :flow_details + # Type of the flow that created the Transaction. + attr_reader :flow_type + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Status of the Transaction. + attr_reader :status + # Attribute for field status_transitions + attr_reader :status_transitions + # Retrieves a list of Transaction objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/transaction_entry.rb b/lib/stripe/resources/treasury/transaction_entry.rb index 599624352..005e4ded9 100644 --- a/lib/stripe/resources/treasury/transaction_entry.rb +++ b/lib/stripe/resources/treasury/transaction_entry.rb @@ -12,12 +12,46 @@ def self.object_name "treasury.transaction_entry" end + class BalanceImpact < Stripe::StripeObject + attr_reader :cash, :inbound_pending, :outbound_pending + end + + class FlowDetails < Stripe::StripeObject + attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type + end + # Change to a FinancialAccount's balance + attr_reader :balance_impact + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # When the TransactionEntry will impact the FinancialAccount's balance. + attr_reader :effective_at + # The FinancialAccount associated with this object. + attr_reader :financial_account + # Token of the flow associated with the TransactionEntry. + attr_reader :flow + # Details of the flow associated with the TransactionEntry. + attr_reader :flow_details + # Type of the flow associated with the TransactionEntry. + attr_reader :flow_type + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The Transaction associated with this object. + attr_reader :transaction + # The specific money movement that generated the TransactionEntry. + attr_reader :type + # Retrieves a list of TransactionEntry objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/transaction_entries", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/usage_record.rb b/lib/stripe/resources/usage_record.rb index 3444824f7..a3b235383 100644 --- a/lib/stripe/resources/usage_record.rb +++ b/lib/stripe/resources/usage_record.rb @@ -13,5 +13,18 @@ class UsageRecord < APIResource def self.object_name "usage_record" end + + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The usage quantity for the specified date. + attr_reader :quantity + # The ID of the subscription item this usage record contains data for. + attr_reader :subscription_item + # The timestamp when this usage occurred. + attr_reader :timestamp end end diff --git a/lib/stripe/resources/usage_record_summary.rb b/lib/stripe/resources/usage_record_summary.rb index 1186754d6..78e1fb4af 100644 --- a/lib/stripe/resources/usage_record_summary.rb +++ b/lib/stripe/resources/usage_record_summary.rb @@ -8,5 +8,23 @@ class UsageRecordSummary < StripeObject def self.object_name "usage_record_summary" end + + class Period < Stripe::StripeObject + attr_reader :end, :start + end + # Unique identifier for the object. + attr_reader :id + # The invoice in which this usage period has been billed for. + attr_reader :invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field period + attr_reader :period + # The ID of the subscription item this summary is describing. + attr_reader :subscription_item + # The total usage within this usage period. + attr_reader :total_usage end end diff --git a/lib/stripe/resources/v2/billing/meter_event.rb b/lib/stripe/resources/v2/billing/meter_event.rb index 95f1e494f..108f37f4b 100644 --- a/lib/stripe/resources/v2/billing/meter_event.rb +++ b/lib/stripe/resources/v2/billing/meter_event.rb @@ -10,6 +10,24 @@ class MeterEvent < APIResource def self.object_name "v2.billing.meter_event" end + + # The creation time of this meter event. + attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. + attr_reader :identifier + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about the payload. + attr_reader :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + attr_reader :timestamp end end end diff --git a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb index f26f857f2..6a2ce37f8 100644 --- a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb @@ -9,6 +9,26 @@ class MeterEventAdjustment < APIResource def self.object_name "v2.billing.meter_event_adjustment" end + + class Cancel < Stripe::StripeObject + attr_reader :identifier + end + # Specifies which event to cancel. + attr_reader :cancel + # The time the adjustment was created. + attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + # The unique id of this meter event adjustment. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + # Open Enum. The meter event adjustment’s status. + attr_reader :status + # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_reader :type end end end diff --git a/lib/stripe/resources/v2/billing/meter_event_session.rb b/lib/stripe/resources/v2/billing/meter_event_session.rb index 0bb2ac4d1..b3c713557 100644 --- a/lib/stripe/resources/v2/billing/meter_event_session.rb +++ b/lib/stripe/resources/v2/billing/meter_event_session.rb @@ -9,6 +9,20 @@ class MeterEventSession < APIResource def self.object_name "v2.billing.meter_event_session" end + + # The authentication token for this session. Use this token when calling the + # high-throughput meter event API. + attr_reader :authentication_token + # The creation time of this session. + attr_reader :created + # The time at which this session will expire. + attr_reader :expires_at + # The unique id of this auth session. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object end end end diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb index df657b403..2746c4bf4 100644 --- a/lib/stripe/resources/v2/event.rb +++ b/lib/stripe/resources/v2/event.rb @@ -8,6 +8,27 @@ class Event < APIResource def self.object_name "v2.core.event" end + + class Reason < Stripe::StripeObject + class Request < Stripe::StripeObject + attr_reader :id, :idempotency_key + end + attr_reader :type, :request + end + # Authentication context needed to fetch the event or related object. + attr_reader :context + # Time at which the object was created. + attr_reader :created + # Unique identifier for the event. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + # Reason for the event. + attr_reader :reason + # The type of the event. + attr_reader :type end end end diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb index ea0880238..a32bff467 100644 --- a/lib/stripe/resources/v2/event_destination.rb +++ b/lib/stripe/resources/v2/event_destination.rb @@ -8,6 +8,55 @@ class EventDestination < APIResource def self.object_name "v2.core.event_destination" end + + class StatusDetails < Stripe::StripeObject + class Disabled < Stripe::StripeObject + attr_reader :reason + end + attr_reader :disabled + end + + class AmazonEventbridge < Stripe::StripeObject + attr_reader :aws_account_id, :aws_event_source_arn, :aws_event_source_status + end + + class WebhookEndpoint < Stripe::StripeObject + attr_reader :signing_secret, :url + end + # Time at which the object was created. + attr_reader :created + # An optional description of what the event destination is used for. + attr_reader :description + # The list of events to enable for this endpoint. + attr_reader :enabled_events + # Payload type of events being subscribed to. + attr_reader :event_payload + # Where events should be routed from. + attr_reader :events_from + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Metadata. + attr_reader :metadata + # Event destination name. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + # If using the snapshot event payload, the API version events are rendered as. + attr_reader :snapshot_api_version + # Status. It can be set to either enabled or disabled. + attr_reader :status + # Additional information about event destination status. + attr_reader :status_details + # Event destination type. + attr_reader :type + # Time at which the object was last updated. + attr_reader :updated + # Amazon EventBridge configuration. + attr_reader :amazon_eventbridge + # Webhook endpoint configuration. + attr_reader :webhook_endpoint end end end diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index 9f9ca1925..dea3e91da 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -20,6 +20,33 @@ def self.object_name "webhook_endpoint" end + # The API version events are rendered as for this webhook endpoint. + attr_reader :api_version + # The ID of the associated Connect application. + attr_reader :application + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # An optional description of what the webhook is used for. + attr_reader :description + # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + attr_reader :enabled_events + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. + attr_reader :secret + # The status of the webhook. It can be `enabled` or `disabled`. + attr_reader :status + # The URL of the webhook endpoint. + attr_reader :url + # Always true for a deleted object + attr_reader :deleted + # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. def self.create(params = {}, opts = {}) request_stripe_object( @@ -51,13 +78,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your webhook endpoints. - def self.list(filters = {}, opts = {}) - request_stripe_object( - method: :get, - path: "/v1/webhook_endpoints", - params: filters, - opts: opts - ) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/webhook_endpoints", params: params, opts: opts) end # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi new file mode 100644 index 000000000..b920a7f1d --- /dev/null +++ b/rbi/stripe/resources/account.rbi @@ -0,0 +1,666 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # This is an object representing a Stripe account. You can retrieve it to see + # properties on the account like its current requirements or if the account is + # enabled to make live charges or receive payouts. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is `application`, which includes Custom accounts, the properties below are always + # returned. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is `stripe`, which includes Standard and Express accounts, some properties are only returned + # until you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions) + # to start Connect Onboarding. Learn about the [differences between accounts](https://stripe.com/connect/accounts). + class Account < APIResource + class BusinessProfile < Stripe::StripeObject + class AnnualRevenue < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :currency + sig { returns(T.nilable(String)) } + attr_reader :fiscal_year_end + end + class MonthlyEstimatedRevenue < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + end + class SupportAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(AnnualRevenue)) } + attr_reader :annual_revenue + sig { returns(T.nilable(Integer)) } + attr_reader :estimated_worker_count + sig { returns(T.nilable(String)) } + attr_reader :mcc + sig { returns(MonthlyEstimatedRevenue) } + attr_reader :monthly_estimated_revenue + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(SupportAddress)) } + attr_reader :support_address + sig { returns(T.nilable(String)) } + attr_reader :support_email + sig { returns(T.nilable(String)) } + attr_reader :support_phone + sig { returns(T.nilable(String)) } + attr_reader :support_url + sig { returns(T.nilable(String)) } + attr_reader :url + end + class Capabilities < Stripe::StripeObject + sig { returns(String) } + attr_reader :acss_debit_payments + sig { returns(String) } + attr_reader :affirm_payments + sig { returns(String) } + attr_reader :afterpay_clearpay_payments + sig { returns(String) } + attr_reader :alma_payments + sig { returns(String) } + attr_reader :amazon_pay_payments + sig { returns(String) } + attr_reader :au_becs_debit_payments + sig { returns(String) } + attr_reader :bacs_debit_payments + sig { returns(String) } + attr_reader :bancontact_payments + sig { returns(String) } + attr_reader :bank_transfer_payments + sig { returns(String) } + attr_reader :blik_payments + sig { returns(String) } + attr_reader :boleto_payments + sig { returns(String) } + attr_reader :card_issuing + sig { returns(String) } + attr_reader :card_payments + sig { returns(String) } + attr_reader :cartes_bancaires_payments + sig { returns(String) } + attr_reader :cashapp_payments + sig { returns(String) } + attr_reader :eps_payments + sig { returns(String) } + attr_reader :fpx_payments + sig { returns(String) } + attr_reader :gb_bank_transfer_payments + sig { returns(String) } + attr_reader :giropay_payments + sig { returns(String) } + attr_reader :gopay_payments + sig { returns(String) } + attr_reader :grabpay_payments + sig { returns(String) } + attr_reader :id_bank_transfer_payments + sig { returns(String) } + attr_reader :id_bank_transfer_payments_bca + sig { returns(String) } + attr_reader :ideal_payments + sig { returns(String) } + attr_reader :india_international_payments + sig { returns(String) } + attr_reader :jcb_payments + sig { returns(String) } + attr_reader :jp_bank_transfer_payments + sig { returns(String) } + attr_reader :kakao_pay_payments + sig { returns(String) } + attr_reader :klarna_payments + sig { returns(String) } + attr_reader :konbini_payments + sig { returns(String) } + attr_reader :kr_card_payments + sig { returns(String) } + attr_reader :legacy_payments + sig { returns(String) } + attr_reader :link_payments + sig { returns(String) } + attr_reader :mb_way_payments + sig { returns(String) } + attr_reader :mobilepay_payments + sig { returns(String) } + attr_reader :multibanco_payments + sig { returns(String) } + attr_reader :mx_bank_transfer_payments + sig { returns(String) } + attr_reader :naver_pay_payments + sig { returns(String) } + attr_reader :oxxo_payments + sig { returns(String) } + attr_reader :p24_payments + sig { returns(String) } + attr_reader :payco_payments + sig { returns(String) } + attr_reader :paynow_payments + sig { returns(String) } + attr_reader :paypal_payments + sig { returns(String) } + attr_reader :payto_payments + sig { returns(String) } + attr_reader :promptpay_payments + sig { returns(String) } + attr_reader :qris_payments + sig { returns(String) } + attr_reader :rechnung_payments + sig { returns(String) } + attr_reader :revolut_pay_payments + sig { returns(String) } + attr_reader :samsung_pay_payments + sig { returns(String) } + attr_reader :sepa_bank_transfer_payments + sig { returns(String) } + attr_reader :sepa_debit_payments + sig { returns(String) } + attr_reader :shopeepay_payments + sig { returns(String) } + attr_reader :sofort_payments + sig { returns(String) } + attr_reader :swish_payments + sig { returns(String) } + attr_reader :tax_reporting_us_1099_k + sig { returns(String) } + attr_reader :tax_reporting_us_1099_misc + sig { returns(String) } + attr_reader :transfers + sig { returns(String) } + attr_reader :treasury + sig { returns(String) } + attr_reader :treasury_evolve + sig { returns(String) } + attr_reader :treasury_fifth_third + sig { returns(String) } + attr_reader :treasury_goldman_sachs + sig { returns(String) } + attr_reader :twint_payments + sig { returns(String) } + attr_reader :us_bank_account_ach_payments + sig { returns(String) } + attr_reader :us_bank_transfer_payments + sig { returns(String) } + attr_reader :zip_payments + end + class Company < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class AddressKana < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :town + end + class AddressKanji < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :town + end + class OwnershipDeclaration < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :date + sig { returns(T.nilable(String)) } + attr_reader :ip + sig { returns(T.nilable(String)) } + attr_reader :user_agent + end + class Verification < Stripe::StripeObject + class Document < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :back + sig { returns(T.nilable(String)) } + attr_reader :details + sig { returns(T.nilable(String)) } + attr_reader :details_code + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :front + end + sig { returns(Document) } + attr_reader :document + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(AddressKana)) } + attr_reader :address_kana + sig { returns(T.nilable(AddressKanji)) } + attr_reader :address_kanji + sig { returns(T::Boolean) } + attr_reader :directors_provided + sig { returns(T::Boolean) } + attr_reader :executives_provided + sig { returns(String) } + attr_reader :export_license_id + sig { returns(String) } + attr_reader :export_purpose_code + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :name_kana + sig { returns(T.nilable(String)) } + attr_reader :name_kanji + sig { returns(T::Boolean) } + attr_reader :owners_provided + sig { returns(T.nilable(OwnershipDeclaration)) } + attr_reader :ownership_declaration + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(String) } + attr_reader :structure + sig { returns(T::Boolean) } + attr_reader :tax_id_provided + sig { returns(String) } + attr_reader :tax_id_registrar + sig { returns(T::Boolean) } + attr_reader :vat_id_provided + sig { returns(T.nilable(Verification)) } + attr_reader :verification + end + class Controller < Stripe::StripeObject + class Application < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :loss_liable + sig { returns(T::Boolean) } + attr_reader :onboarding_owner + sig { returns(T::Boolean) } + attr_reader :pricing_controls + end + class Dashboard < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Fees < Stripe::StripeObject + sig { returns(String) } + attr_reader :payer + end + class Losses < Stripe::StripeObject + sig { returns(String) } + attr_reader :payments + end + class StripeDashboard < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(Application) } + attr_reader :application + sig { returns(Dashboard) } + attr_reader :dashboard + sig { returns(Fees) } + attr_reader :fees + sig { returns(T::Boolean) } + attr_reader :is_controller + sig { returns(Losses) } + attr_reader :losses + sig { returns(String) } + attr_reader :requirement_collection + sig { returns(StripeDashboard) } + attr_reader :stripe_dashboard + sig { returns(String) } + attr_reader :type + end + class FutureRequirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :alternative_fields_due + sig { returns(T::Array[String]) } + attr_reader :original_fields_due + end + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[Alternative])) } + attr_reader :alternatives + sig { returns(T.nilable(Integer)) } + attr_reader :current_deadline + sig { returns(T.nilable(T::Array[String])) } + attr_reader :currently_due + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason + sig { returns(T.nilable(T::Array[Error])) } + attr_reader :errors + sig { returns(T.nilable(T::Array[String])) } + attr_reader :eventually_due + sig { returns(T.nilable(T::Array[String])) } + attr_reader :past_due + sig { returns(T.nilable(T::Array[String])) } + attr_reader :pending_verification + end + class Groups < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :payments_pricing + end + class Requirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :alternative_fields_due + sig { returns(T::Array[String]) } + attr_reader :original_fields_due + end + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[Alternative])) } + attr_reader :alternatives + sig { returns(T.nilable(Integer)) } + attr_reader :current_deadline + sig { returns(T.nilable(T::Array[String])) } + attr_reader :currently_due + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason + sig { returns(T.nilable(T::Array[Error])) } + attr_reader :errors + sig { returns(T.nilable(T::Array[String])) } + attr_reader :eventually_due + sig { returns(T.nilable(T::Array[String])) } + attr_reader :past_due + sig { returns(T.nilable(T::Array[String])) } + attr_reader :pending_verification + end + class RiskControls < Stripe::StripeObject + class Charges < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :pause_requested + end + class Payouts < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :pause_requested + end + sig { returns(Charges) } + attr_reader :charges + sig { returns(Payouts) } + attr_reader :payouts + end + class Settings < Stripe::StripeObject + class BacsDebitPayments < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :display_name + sig { returns(T.nilable(String)) } + attr_reader :service_user_number + end + class BankBcaOnboarding < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :business_account_number + end + class Branding < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :icon + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :logo + sig { returns(T.nilable(String)) } + attr_reader :primary_color + sig { returns(T.nilable(String)) } + attr_reader :secondary_color + end + class Capital < Stripe::StripeObject + sig { returns(T::Hash[String, String]) } + attr_reader :payout_destination + sig { returns(T::Hash[String, T::Array[String]]) } + attr_reader :payout_destination_selector + end + class CardIssuing < Stripe::StripeObject + class TosAcceptance < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :date + sig { returns(T.nilable(String)) } + attr_reader :ip + sig { returns(String) } + attr_reader :user_agent + end + sig { returns(TosAcceptance) } + attr_reader :tos_acceptance + end + class CardPayments < Stripe::StripeObject + class DeclineOn < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :avs_failure + sig { returns(T::Boolean) } + attr_reader :cvc_failure + end + sig { returns(DeclineOn) } + attr_reader :decline_on + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_prefix + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_prefix_kana + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_prefix_kanji + end + class Dashboard < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :display_name + sig { returns(T.nilable(String)) } + attr_reader :timezone + end + class Invoices < Stripe::StripeObject + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :default_account_tax_ids + end + class Payments < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_kana + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_kanji + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_prefix_kana + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_prefix_kanji + end + class Payouts < Stripe::StripeObject + class Schedule < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :delay_days + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :monthly_anchor + sig { returns(String) } + attr_reader :weekly_anchor + end + sig { returns(T::Boolean) } + attr_reader :debit_negative_balances + sig { returns(Schedule) } + attr_reader :schedule + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class SepaDebitPayments < Stripe::StripeObject + sig { returns(String) } + attr_reader :creditor_id + end + class TaxForms < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :consented_to_paperless_delivery + end + class Treasury < Stripe::StripeObject + class TosAcceptance < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :date + sig { returns(T.nilable(String)) } + attr_reader :ip + sig { returns(String) } + attr_reader :user_agent + end + sig { returns(TosAcceptance) } + attr_reader :tos_acceptance + end + sig { returns(BacsDebitPayments) } + attr_reader :bacs_debit_payments + sig { returns(BankBcaOnboarding) } + attr_reader :bank_bca_onboarding + sig { returns(Branding) } + attr_reader :branding + sig { returns(Capital) } + attr_reader :capital + sig { returns(CardIssuing) } + attr_reader :card_issuing + sig { returns(CardPayments) } + attr_reader :card_payments + sig { returns(Dashboard) } + attr_reader :dashboard + sig { returns(Invoices) } + attr_reader :invoices + sig { returns(Payments) } + attr_reader :payments + sig { returns(Payouts) } + attr_reader :payouts + sig { returns(SepaDebitPayments) } + attr_reader :sepa_debit_payments + sig { returns(TaxForms) } + attr_reader :tax_forms + sig { returns(Treasury) } + attr_reader :treasury + end + class TosAcceptance < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :date + sig { returns(T.nilable(String)) } + attr_reader :ip + sig { returns(String) } + attr_reader :service_agreement + sig { returns(T.nilable(String)) } + attr_reader :user_agent + end + sig { returns(T.nilable(BusinessProfile)) } + # Business information about the account. + attr_reader :business_profile + sig { returns(T.nilable(String)) } + # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :business_type + sig { returns(Capabilities) } + # Attribute for field capabilities + attr_reader :capabilities + sig { returns(T::Boolean) } + # Whether the account can process charges. + attr_reader :charges_enabled + sig { returns(Company) } + # Attribute for field company + attr_reader :company + sig { returns(Controller) } + # Attribute for field controller + attr_reader :controller + sig { returns(String) } + # The account's country. + attr_reader :country + sig { returns(Integer) } + # Time at which the account was connected. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + attr_reader :default_currency + sig { returns(T::Boolean) } + # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + attr_reader :details_submitted + sig { returns(T.nilable(String)) } + # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + attr_reader :email + sig { returns(Stripe::ListObject) } + # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + attr_reader :external_accounts + sig { returns(FutureRequirements) } + # Attribute for field future_requirements + attr_reader :future_requirements + sig { returns(T.nilable(Groups)) } + # The groups associated with the account. + attr_reader :groups + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(Stripe::Person) } + # This is an object representing a person associated with a Stripe account. + # + # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. + # + # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + attr_reader :individual + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Whether the funds in this account can be paid out. + attr_reader :payouts_enabled + sig { returns(Requirements) } + # Attribute for field requirements + attr_reader :requirements + sig { returns(RiskControls) } + # Attribute for field risk_controls + attr_reader :risk_controls + sig { returns(T.nilable(Settings)) } + # Options for customizing how the account functions within Stripe. + attr_reader :settings + sig { returns(TosAcceptance) } + # Attribute for field tos_acceptance + attr_reader :tos_acceptance + sig { returns(String) } + # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + attr_reader :type + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/account_link.rbi b/rbi/stripe/resources/account_link.rbi new file mode 100644 index 000000000..60e21281a --- /dev/null +++ b/rbi/stripe/resources/account_link.rbi @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Account Links are the means by which a Connect platform grants a connected account permission to access + # Stripe-hosted applications, such as Connect Onboarding. + # + # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) + class AccountLink < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Integer) } + # The timestamp at which this account link will expire. + attr_reader :expires_at + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The URL for the account link. + attr_reader :url + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/account_notice.rbi b/rbi/stripe/resources/account_notice.rbi new file mode 100644 index 000000000..0c33d7771 --- /dev/null +++ b/rbi/stripe/resources/account_notice.rbi @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself. + # + # See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts. + class AccountNotice < APIResource + class Email < Stripe::StripeObject + sig { returns(String) } + attr_reader :plain_text + sig { returns(String) } + attr_reader :recipient + sig { returns(String) } + attr_reader :subject + end + class LinkedObjects < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :capability + sig { returns(T.nilable(String)) } + attr_reader :issuing_credit_underwriting_record + sig { returns(T.nilable(String)) } + attr_reader :issuing_dispute + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(Integer)) } + # When present, the deadline for sending the notice to meet the relevant regulations. + attr_reader :deadline + sig { returns(T.nilable(Email)) } + # Information about the email when sent. + attr_reader :email + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(LinkedObjects)) } + # Information about objects related to the notice. + attr_reader :linked_objects + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. + attr_reader :reason + sig { returns(T.nilable(Integer)) } + # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. + attr_reader :sent_at + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi new file mode 100644 index 000000000..33470f161 --- /dev/null +++ b/rbi/stripe/resources/account_session.rbi @@ -0,0 +1,219 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. + # + # We recommend that you create an AccountSession each time you need to display an embedded component + # to your user. Do not save AccountSessions to your database as they expire relatively + # quickly, and cannot be used more than once. + # + # Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + class AccountSession < APIResource + class Components < Stripe::StripeObject + class AccountManagement < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :disable_stripe_user_authentication + sig { returns(T::Boolean) } + attr_reader :external_account_collection + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class AccountOnboarding < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :disable_stripe_user_authentication + sig { returns(T::Boolean) } + attr_reader :external_account_collection + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class Balances < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :disable_stripe_user_authentication + sig { returns(T::Boolean) } + attr_reader :edit_payout_schedule + sig { returns(T::Boolean) } + attr_reader :external_account_collection + sig { returns(T::Boolean) } + attr_reader :instant_payouts + sig { returns(T::Boolean) } + attr_reader :standard_payouts + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class CapitalFinancing < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class CapitalFinancingApplication < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class CapitalFinancingPromotion < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class Documents < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class NotificationBanner < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :disable_stripe_user_authentication + sig { returns(T::Boolean) } + attr_reader :external_account_collection + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class PaymentDetails < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :capture_payments + sig { returns(T::Boolean) } + attr_reader :destination_on_behalf_of_charge_management + sig { returns(T::Boolean) } + attr_reader :dispute_management + sig { returns(T::Boolean) } + attr_reader :refund_management + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class Payments < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :capture_payments + sig { returns(T::Boolean) } + attr_reader :destination_on_behalf_of_charge_management + sig { returns(T::Boolean) } + attr_reader :dispute_management + sig { returns(T::Boolean) } + attr_reader :refund_management + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class Payouts < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :disable_stripe_user_authentication + sig { returns(T::Boolean) } + attr_reader :edit_payout_schedule + sig { returns(T::Boolean) } + attr_reader :external_account_collection + sig { returns(T::Boolean) } + attr_reader :instant_payouts + sig { returns(T::Boolean) } + attr_reader :standard_payouts + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class PayoutsList < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class TaxRegistrations < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + class TaxSettings < Stripe::StripeObject + class Features < Stripe::StripeObject; end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(Features) } + attr_reader :features + end + sig { returns(AccountManagement) } + attr_reader :account_management + sig { returns(AccountOnboarding) } + attr_reader :account_onboarding + sig { returns(Balances) } + attr_reader :balances + sig { returns(T.nilable(CapitalFinancing)) } + attr_reader :capital_financing + sig { returns(T.nilable(CapitalFinancingApplication)) } + attr_reader :capital_financing_application + sig { returns(T.nilable(CapitalFinancingPromotion)) } + attr_reader :capital_financing_promotion + sig { returns(Documents) } + attr_reader :documents + sig { returns(NotificationBanner) } + attr_reader :notification_banner + sig { returns(PaymentDetails) } + attr_reader :payment_details + sig { returns(Payments) } + attr_reader :payments + sig { returns(Payouts) } + attr_reader :payouts + sig { returns(PayoutsList) } + attr_reader :payouts_list + sig { returns(TaxRegistrations) } + attr_reader :tax_registrations + sig { returns(TaxSettings) } + attr_reader :tax_settings + end + sig { returns(String) } + # The ID of the account the AccountSession was created for + attr_reader :account + sig { returns(String) } + # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. + # + # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. + # + # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + attr_reader :client_secret + sig { returns(Components) } + # Attribute for field components + attr_reader :components + sig { returns(Integer) } + # The timestamp at which this AccountSession will expire. + attr_reader :expires_at + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/apple_pay_domain.rbi b/rbi/stripe/resources/apple_pay_domain.rbi new file mode 100644 index 000000000..a4df7fa52 --- /dev/null +++ b/rbi/stripe/resources/apple_pay_domain.rbi @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Domains registered for Apple Pay on the Web + class ApplePayDomain < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Attribute for field domain_name + attr_reader :domain_name + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee.rbi b/rbi/stripe/resources/application_fee.rbi new file mode 100644 index 000000000..11c48870c --- /dev/null +++ b/rbi/stripe/resources/application_fee.rbi @@ -0,0 +1,60 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class ApplicationFee < APIResource + class FeeSource < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :payout + sig { returns(String) } + attr_reader :type + end + sig { returns(T.any(String, Stripe::Account)) } + # ID of the Stripe account this fee was taken from. + attr_reader :account + sig { returns(Integer) } + # Amount earned, in cents (or local equivalent). + attr_reader :amount + sig { returns(Integer) } + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + attr_reader :amount_refunded + sig { returns(T.any(String, Stripe::Application)) } + # ID of the Connect application that earned the fee. + attr_reader :application + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + attr_reader :balance_transaction + sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge that the application fee was taken from. + attr_reader :charge + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(FeeSource)) } + # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + attr_reader :fee_source + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + attr_reader :originating_transaction + sig { returns(T::Boolean) } + # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + attr_reader :refunded + sig { returns(Stripe::ListObject) } + # A list of refunds that have been applied to the fee. + attr_reader :refunds + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee_refund.rbi b/rbi/stripe/resources/application_fee_refund.rbi new file mode 100644 index 000000000..5eeae0ea4 --- /dev/null +++ b/rbi/stripe/resources/application_fee_refund.rbi @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # `Application Fee Refund` objects allow you to refund an application fee that + # has previously been created but not yet refunded. Funds will be refunded to + # the Stripe account from which the fee was originally collected. + # + # Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) + class ApplicationFeeRefund < APIResource + sig { returns(Integer) } + # Amount, in cents (or local equivalent). + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. + attr_reader :balance_transaction + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.any(String, Stripe::ApplicationFee)) } + # ID of the application fee that was refunded. + attr_reader :fee + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/apps/secret.rbi b/rbi/stripe/resources/apps/secret.rbi new file mode 100644 index 000000000..7d79ca933 --- /dev/null +++ b/rbi/stripe/resources/apps/secret.rbi @@ -0,0 +1,51 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Apps + # Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + # + # The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + # + # All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + # + # A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + # + # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) + class Secret < APIResource + class Scope < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(String) } + attr_reader :user + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T::Boolean) } + # If true, indicates that this secret has been deleted + attr_reader :deleted + sig { returns(T.nilable(Integer)) } + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + attr_reader :expires_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # A name for the secret that's unique within the scope. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The plaintext secret value to be stored. + attr_reader :payload + sig { returns(Scope) } + # Attribute for field scope + attr_reader :scope + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/balance.rbi b/rbi/stripe/resources/balance.rbi new file mode 100644 index 000000000..3dad535f2 --- /dev/null +++ b/rbi/stripe/resources/balance.rbi @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # This is an object representing your Stripe balance. You can retrieve it to see + # the balance currently on your Stripe account. + # + # You can also retrieve the balance history, which contains a list of + # [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance + # (charges, payouts, and so forth). + # + # The available and pending amounts for each currency are broken down further by + # payment source types. + # + # Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) + class Balance < SingletonAPIResource + class Available < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :bank_account + sig { returns(Integer) } + attr_reader :card + sig { returns(Integer) } + attr_reader :fpx + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(SourceTypes) } + attr_reader :source_types + end + class ConnectReserved < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :bank_account + sig { returns(Integer) } + attr_reader :card + sig { returns(Integer) } + attr_reader :fpx + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(SourceTypes) } + attr_reader :source_types + end + class InstantAvailable < Stripe::StripeObject + class NetAvailable < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :bank_account + sig { returns(Integer) } + attr_reader :card + sig { returns(Integer) } + attr_reader :fpx + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :destination + sig { returns(SourceTypes) } + attr_reader :source_types + end + class SourceTypes < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :bank_account + sig { returns(Integer) } + attr_reader :card + sig { returns(Integer) } + attr_reader :fpx + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(T::Array[NetAvailable]) } + attr_reader :net_available + sig { returns(SourceTypes) } + attr_reader :source_types + end + class Issuing < Stripe::StripeObject + class Available < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :bank_account + sig { returns(Integer) } + attr_reader :card + sig { returns(Integer) } + attr_reader :fpx + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(SourceTypes) } + attr_reader :source_types + end + sig { returns(T::Array[Available]) } + attr_reader :available + end + class Pending < Stripe::StripeObject + class SourceTypes < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :bank_account + sig { returns(Integer) } + attr_reader :card + sig { returns(Integer) } + attr_reader :fpx + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(SourceTypes) } + attr_reader :source_types + end + sig { returns(T::Array[Available]) } + # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + attr_reader :available + sig { returns(T::Array[ConnectReserved]) } + # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + attr_reader :connect_reserved + sig { returns(T::Array[InstantAvailable]) } + # Funds that you can pay out using Instant Payouts. + attr_reader :instant_available + sig { returns(Issuing) } + # Attribute for field issuing + attr_reader :issuing + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[Pending]) } + # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + attr_reader :pending + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/balance_transaction.rbi b/rbi/stripe/resources/balance_transaction.rbi new file mode 100644 index 000000000..ea39cba38 --- /dev/null +++ b/rbi/stripe/resources/balance_transaction.rbi @@ -0,0 +1,70 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Balance transactions represent funds moving through your Stripe account. + # Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. + # + # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) + class BalanceTransaction < APIResource + class FeeDetail < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :application + sig { returns(String) } + attr_reader :currency + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(String) } + attr_reader :type + end + sig { returns(Integer) } + # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. + attr_reader :amount + sig { returns(Integer) } + # The date that the transaction's net funds become available in the Stripe balance. + attr_reader :available_on + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(Float)) } + # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + attr_reader :exchange_rate + sig { returns(Integer) } + # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + attr_reader :fee + sig { returns(T::Array[FeeDetail]) } + # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + attr_reader :fee_details + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(Integer) } + # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + attr_reader :net + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + attr_reader :reporting_category + sig { + returns(T.nilable(T.any(String, T.any(Stripe::ApplicationFee, Stripe::Charge, Stripe::ConnectCollectionTransfer, Stripe::CustomerCashBalanceTransaction, Stripe::Dispute, Stripe::ApplicationFeeRefund, Stripe::Issuing::Authorization, Stripe::Issuing::Dispute, Stripe::Issuing::Transaction, Stripe::Payout, Stripe::Refund, Stripe::ReserveTransaction, Stripe::TaxDeductedAtSource, Stripe::Topup, Stripe::Transfer, Stripe::Reversal)))) + } + # This transaction relates to the Stripe object. + attr_reader :source + sig { returns(String) } + # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. + attr_reader :status + sig { returns(String) } + # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/bank_account.rbi b/rbi/stripe/resources/bank_account.rbi new file mode 100644 index 000000000..25d85c2bc --- /dev/null +++ b/rbi/stripe/resources/bank_account.rbi @@ -0,0 +1,112 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # These bank accounts are payment methods on `Customer` objects. + # + # On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer + # destinations on `Account` objects for connected accounts. + # They can be bank accounts or debit cards as well, and are documented in the links above. + # + # Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers) + class BankAccount < APIResource + class FutureRequirements < Stripe::StripeObject + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[String])) } + attr_reader :currently_due + sig { returns(T.nilable(T::Array[Error])) } + attr_reader :errors + sig { returns(T.nilable(T::Array[String])) } + attr_reader :past_due + sig { returns(T.nilable(T::Array[String])) } + attr_reader :pending_verification + end + class Requirements < Stripe::StripeObject + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[String])) } + attr_reader :currently_due + sig { returns(T.nilable(T::Array[Error])) } + attr_reader :errors + sig { returns(T.nilable(T::Array[String])) } + attr_reader :past_due + sig { returns(T.nilable(T::Array[String])) } + attr_reader :pending_verification + end + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The ID of the account that the bank account is associated with. + attr_reader :account + sig { returns(T.nilable(String)) } + # The name of the person or business that owns the bank account. + attr_reader :account_holder_name + sig { returns(T.nilable(String)) } + # The type of entity that holds the account. This can be either `individual` or `company`. + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + attr_reader :account_type + sig { returns(T.nilable(T::Array[String])) } + # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + attr_reader :available_payout_methods + sig { returns(T.nilable(String)) } + # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + attr_reader :bank_name + sig { returns(String) } + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + sig { returns(String) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer that the bank account is associated with. + attr_reader :customer + sig { returns(T.nilable(T::Boolean)) } + # Whether this bank account is the default external account for its currency. + attr_reader :default_for_currency + sig { returns(T.nilable(String)) } + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + sig { returns(T.nilable(FutureRequirements)) } + # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + attr_reader :future_requirements + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # The last four digits of the bank account number. + attr_reader :last4 + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Requirements)) } + # Information about the requirements for the bank account, including what information needs to be collected. + attr_reader :requirements + sig { returns(T.nilable(String)) } + # The routing transit number for the bank account. + attr_reader :routing_number + sig { returns(String) } + # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. + # + # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + attr_reader :status + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi new file mode 100644 index 000000000..f419f1ab3 --- /dev/null +++ b/rbi/stripe/resources/billing/alert.rbi @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + class Alert < APIResource + class UsageThreshold < Stripe::StripeObject + class Filter < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + attr_reader :customer + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[Filter])) } + attr_reader :filters + sig { returns(Integer) } + attr_reader :gte + sig { returns(T.any(String, Stripe::Billing::Meter)) } + attr_reader :meter + sig { returns(String) } + attr_reader :recurrence + end + sig { returns(String) } + # Defines the type of the alert. + attr_reader :alert_type + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # Status of the alert. This can be active, inactive or archived. + attr_reader :status + sig { returns(String) } + # Title of the alert. + attr_reader :title + sig { returns(T.nilable(UsageThreshold)) } + # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + attr_reader :usage_threshold + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi new file mode 100644 index 000000000..966ef5a92 --- /dev/null +++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # Indicates the billing credit balance for billing credits granted to a customer. + class CreditBalanceSummary < SingletonAPIResource + class Balance < Stripe::StripeObject + class AvailableBalance < Stripe::StripeObject + class Monetary < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + sig { returns(T.nilable(Monetary)) } + attr_reader :monetary + sig { returns(String) } + attr_reader :type + end + class LedgerBalance < Stripe::StripeObject + class Monetary < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + sig { returns(T.nilable(Monetary)) } + attr_reader :monetary + sig { returns(String) } + attr_reader :type + end + sig { returns(AvailableBalance) } + attr_reader :available_balance + sig { returns(LedgerBalance) } + attr_reader :ledger_balance + end + sig { returns(T::Array[Balance]) } + # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + attr_reader :balances + sig { returns(T.any(String, Stripe::Customer)) } + # The customer the balance is for. + attr_reader :customer + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi new file mode 100644 index 000000000..7fa79cd6d --- /dev/null +++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi @@ -0,0 +1,84 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. + class CreditBalanceTransaction < APIResource + class Credit < Stripe::StripeObject + class Amount < Stripe::StripeObject + class Monetary < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + sig { returns(T.nilable(Monetary)) } + attr_reader :monetary + sig { returns(String) } + attr_reader :type + end + sig { returns(Amount) } + attr_reader :amount + sig { returns(String) } + attr_reader :type + end + class Debit < Stripe::StripeObject + class Amount < Stripe::StripeObject + class Monetary < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + sig { returns(T.nilable(Monetary)) } + attr_reader :monetary + sig { returns(String) } + attr_reader :type + end + class CreditsApplied < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Invoice)) } + attr_reader :invoice + sig { returns(String) } + attr_reader :invoice_line_item + end + sig { returns(Amount) } + attr_reader :amount + sig { returns(T.nilable(CreditsApplied)) } + attr_reader :credits_applied + sig { returns(String) } + attr_reader :type + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(Credit)) } + # Credit details for this credit balance transaction. Only present if type is `credit`. + attr_reader :credit + sig { returns(T.any(String, Stripe::Billing::CreditGrant)) } + # The credit grant associated with this credit balance transaction. + attr_reader :credit_grant + sig { returns(T.nilable(Debit)) } + # Debit details for this credit balance transaction. Only present if type is `debit`. + attr_reader :debit + sig { returns(Integer) } + # The effective time of this credit balance transaction. + attr_reader :effective_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this credit balance transaction belongs to. + attr_reader :test_clock + sig { returns(T.nilable(String)) } + # The type of credit balance transaction (credit or debit). + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi new file mode 100644 index 000000000..14202ef62 --- /dev/null +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A credit grant is an API resource that documents the allocation of some billing credits to a customer. + # + # Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) + class CreditGrant < APIResource + class Amount < Stripe::StripeObject + class Monetary < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + sig { returns(T.nilable(Monetary)) } + attr_reader :monetary + sig { returns(String) } + attr_reader :type + end + class ApplicabilityConfig < Stripe::StripeObject + class Scope < Stripe::StripeObject + sig { returns(String) } + attr_reader :price_type + end + sig { returns(Scope) } + attr_reader :scope + end + sig { returns(Amount) } + # Attribute for field amount + attr_reader :amount + sig { returns(ApplicabilityConfig) } + # Attribute for field applicability_config + attr_reader :applicability_config + sig { returns(String) } + # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + attr_reader :category + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer receiving the billing credits. + attr_reader :customer + sig { returns(T.nilable(Integer)) } + # The time when the billing credits become effective—when they're eligible for use. + attr_reader :effective_at + sig { returns(T.nilable(Integer)) } + # The time when the billing credits expire. If not present, the billing credits don't expire. + attr_reader :expires_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # A descriptive name shown in dashboard. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this credit grant belongs to. + attr_reader :test_clock + sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + sig { returns(T.nilable(Integer)) } + # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + attr_reader :voided_at + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter.rbi b/rbi/stripe/resources/billing/meter.rbi new file mode 100644 index 000000000..32ce6d6bc --- /dev/null +++ b/rbi/stripe/resources/billing/meter.rbi @@ -0,0 +1,69 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. + # + # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) + class Meter < APIResource + class CustomerMapping < Stripe::StripeObject + sig { returns(String) } + attr_reader :event_payload_key + sig { returns(String) } + attr_reader :type + end + class DefaultAggregation < Stripe::StripeObject + sig { returns(String) } + attr_reader :formula + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :deactivated_at + end + class ValueSettings < Stripe::StripeObject + sig { returns(String) } + attr_reader :event_payload_key + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(CustomerMapping) } + # Attribute for field customer_mapping + attr_reader :customer_mapping + sig { returns(DefaultAggregation) } + # Attribute for field default_aggregation + attr_reader :default_aggregation + sig { returns(String) } + # The meter's name. + attr_reader :display_name + sig { returns(String) } + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + attr_reader :event_name + sig { returns(T.nilable(String)) } + # The time window to pre-aggregate meter events for, if any. + attr_reader :event_time_window + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The meter's status. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + sig { returns(ValueSettings) } + # Attribute for field value_settings + attr_reader :value_settings + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_event.rbi b/rbi/stripe/resources/billing/meter_event.rbi new file mode 100644 index 000000000..4eeff2fb2 --- /dev/null +++ b/rbi/stripe/resources/billing/meter_event.rbi @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. + # Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. + class MeterEvent < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + sig { returns(String) } + # A unique identifier for the event. + attr_reader :identifier + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Hash[String, String]) } + # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + attr_reader :payload + sig { returns(Integer) } + # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + attr_reader :timestamp + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/billing/meter_event_adjustment.rbi new file mode 100644 index 000000000..c0c299938 --- /dev/null +++ b/rbi/stripe/resources/billing/meter_event_adjustment.rbi @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. + class MeterEventAdjustment < APIResource + class Cancel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :identifier + end + sig { returns(T.nilable(Cancel)) } + # Specifies which event to cancel. + attr_reader :cancel + sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The meter event adjustment's status. + attr_reader :status + sig { returns(String) } + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_event_summary.rbi b/rbi/stripe/resources/billing/meter_event_summary.rbi new file mode 100644 index 000000000..6e6b3371c --- /dev/null +++ b/rbi/stripe/resources/billing/meter_event_summary.rbi @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much + # usage was accrued by a customer for that period. + class MeterEventSummary < APIResource + sig { returns(Float) } + # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + attr_reader :aggregated_value + sig { returns(Integer) } + # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + attr_reader :end_time + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The meter associated with this event summary. + attr_reader :meter + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + attr_reader :start_time + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing_portal/configuration.rbi b/rbi/stripe/resources/billing_portal/configuration.rbi new file mode 100644 index 000000000..122f5ee78 --- /dev/null +++ b/rbi/stripe/resources/billing_portal/configuration.rbi @@ -0,0 +1,131 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module BillingPortal + # A portal configuration describes the functionality and behavior of a portal session. + class Configuration < APIResource + class BusinessProfile < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :headline + sig { returns(T.nilable(String)) } + attr_reader :privacy_policy_url + sig { returns(T.nilable(String)) } + attr_reader :terms_of_service_url + end + class Features < Stripe::StripeObject + class CustomerUpdate < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :allowed_updates + sig { returns(T::Boolean) } + attr_reader :enabled + end + class InvoiceHistory < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class PaymentMethodUpdate < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class SubscriptionCancel < Stripe::StripeObject + class CancellationReason < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T::Array[String]) } + attr_reader :options + end + sig { returns(CancellationReason) } + attr_reader :cancellation_reason + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(String) } + attr_reader :mode + sig { returns(String) } + attr_reader :proration_behavior + end + class SubscriptionUpdate < Stripe::StripeObject + class Product < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :prices + sig { returns(String) } + attr_reader :product + end + class ScheduleAtPeriodEnd < Stripe::StripeObject + class Condition < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Array[Condition]) } + attr_reader :conditions + end + sig { returns(T::Array[String]) } + attr_reader :default_allowed_updates + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(T::Array[Product])) } + attr_reader :products + sig { returns(String) } + attr_reader :proration_behavior + sig { returns(ScheduleAtPeriodEnd) } + attr_reader :schedule_at_period_end + end + sig { returns(CustomerUpdate) } + attr_reader :customer_update + sig { returns(InvoiceHistory) } + attr_reader :invoice_history + sig { returns(PaymentMethodUpdate) } + attr_reader :payment_method_update + sig { returns(SubscriptionCancel) } + attr_reader :subscription_cancel + sig { returns(SubscriptionUpdate) } + attr_reader :subscription_update + end + class LoginPage < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(String)) } + attr_reader :url + end + sig { returns(T::Boolean) } + # Whether the configuration is active and can be used to create portal sessions. + attr_reader :active + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the configuration. + attr_reader :application + sig { returns(BusinessProfile) } + # Attribute for field business_profile + attr_reader :business_profile + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + attr_reader :default_return_url + sig { returns(Features) } + # Attribute for field features + attr_reader :features + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. + attr_reader :is_default + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(LoginPage) } + # Attribute for field login_page + attr_reader :login_page + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi new file mode 100644 index 000000000..1b6518948 --- /dev/null +++ b/rbi/stripe/resources/billing_portal/session.rbi @@ -0,0 +1,126 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module BillingPortal + # The Billing customer portal is a Stripe-hosted UI for subscription and + # billing management. + # + # A portal configuration describes the functionality and features that you + # want to provide to your customers through the portal. + # + # A portal session describes the instantiation of the customer portal for + # a particular customer. By visiting the session's URL, the customer + # can manage their subscriptions and billing details. For security reasons, + # sessions are short-lived and will expire if the customer does not visit the URL. + # Create sessions on-demand when customers intend to manage their subscriptions + # and billing details. + # + # Related guide: [Customer management](https://stripe.com/customer-management) + class Session < APIResource + class Flow < Stripe::StripeObject + class AfterCompletion < Stripe::StripeObject + class HostedConfirmation < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :custom_message + end + class Redirect < Stripe::StripeObject + sig { returns(String) } + attr_reader :return_url + end + sig { returns(T.nilable(HostedConfirmation)) } + attr_reader :hosted_confirmation + sig { returns(T.nilable(Redirect)) } + attr_reader :redirect + sig { returns(String) } + attr_reader :type + end + class SubscriptionCancel < Stripe::StripeObject + class Retention < Stripe::StripeObject + class CouponOffer < Stripe::StripeObject + sig { returns(String) } + attr_reader :coupon + end + sig { returns(T.nilable(CouponOffer)) } + attr_reader :coupon_offer + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Retention)) } + attr_reader :retention + sig { returns(String) } + attr_reader :subscription + end + class SubscriptionUpdate < Stripe::StripeObject + sig { returns(String) } + attr_reader :subscription + end + class SubscriptionUpdateConfirm < Stripe::StripeObject + class Discount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :coupon + sig { returns(T.nilable(String)) } + attr_reader :promotion_code + end + class Item < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :id + sig { returns(T.nilable(String)) } + attr_reader :price + sig { returns(Integer) } + attr_reader :quantity + end + sig { returns(T.nilable(T::Array[Discount])) } + attr_reader :discounts + sig { returns(T::Array[Item]) } + attr_reader :items + sig { returns(String) } + attr_reader :subscription + end + sig { returns(AfterCompletion) } + attr_reader :after_completion + sig { returns(T.nilable(SubscriptionCancel)) } + attr_reader :subscription_cancel + sig { returns(T.nilable(SubscriptionUpdate)) } + attr_reader :subscription_update + sig { returns(T.nilable(SubscriptionUpdateConfirm)) } + attr_reader :subscription_update_confirm + sig { returns(String) } + attr_reader :type + end + sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) } + # The configuration used by this session, describing the features available. + attr_reader :configuration + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The ID of the customer for this session. + attr_reader :customer + sig { returns(T.nilable(Flow)) } + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + attr_reader :flow + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + attr_reader :locale + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + attr_reader :on_behalf_of + sig { returns(T.nilable(String)) } + # The URL to redirect customers to when they click on the portal's link to return to your website. + attr_reader :return_url + sig { returns(String) } + # The short-lived URL of the session that gives customers access to the customer portal. + attr_reader :url + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi new file mode 100644 index 000000000..0c622b43f --- /dev/null +++ b/rbi/stripe/resources/capability.rbi @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # This is an object representing a capability for a Stripe account. + # + # Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) + class Capability < APIResource + class FutureRequirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :alternative_fields_due + sig { returns(T::Array[String]) } + attr_reader :original_fields_due + end + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[Alternative])) } + attr_reader :alternatives + sig { returns(T.nilable(Integer)) } + attr_reader :current_deadline + sig { returns(T::Array[String]) } + attr_reader :currently_due + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason + sig { returns(T::Array[Error]) } + attr_reader :errors + sig { returns(T::Array[String]) } + attr_reader :eventually_due + sig { returns(T::Array[String]) } + attr_reader :past_due + sig { returns(T::Array[String]) } + attr_reader :pending_verification + end + class Requirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :alternative_fields_due + sig { returns(T::Array[String]) } + attr_reader :original_fields_due + end + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[Alternative])) } + attr_reader :alternatives + sig { returns(T.nilable(Integer)) } + attr_reader :current_deadline + sig { returns(T::Array[String]) } + attr_reader :currently_due + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason + sig { returns(T::Array[Error]) } + attr_reader :errors + sig { returns(T::Array[String]) } + attr_reader :eventually_due + sig { returns(T::Array[String]) } + attr_reader :past_due + sig { returns(T::Array[String]) } + attr_reader :pending_verification + end + sig { returns(T.any(String, Stripe::Account)) } + # The account for which the capability enables functionality. + attr_reader :account + sig { returns(FutureRequirements) } + # Attribute for field future_requirements + attr_reader :future_requirements + sig { returns(String) } + # The identifier for the capability. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Whether the capability has been requested. + attr_reader :requested + sig { returns(T.nilable(Integer)) } + # Time at which the capability was requested. Measured in seconds since the Unix epoch. + attr_reader :requested_at + sig { returns(Requirements) } + # Attribute for field requirements + attr_reader :requirements + sig { returns(String) } + # The status of the capability. + attr_reader :status + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_offer.rbi b/rbi/stripe/resources/capital/financing_offer.rbi new file mode 100644 index 000000000..04c14ce02 --- /dev/null +++ b/rbi/stripe/resources/capital/financing_offer.rbi @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Capital + # This is an object representing an offer of financing from + # Stripe Capital to a Connect subaccount. + class FinancingOffer < APIResource + class AcceptedTerms < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :advance_amount + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :fee_amount + sig { returns(T.nilable(Integer)) } + attr_reader :previous_financing_fee_discount_amount + sig { returns(Float) } + attr_reader :withhold_rate + end + class OfferedTerms < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :advance_amount + sig { returns(String) } + attr_reader :campaign_type + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :fee_amount + sig { returns(T.nilable(Float)) } + attr_reader :previous_financing_fee_discount_rate + sig { returns(Float) } + attr_reader :withhold_rate + end + sig { returns(AcceptedTerms) } + # This is an object representing the terms of an offer of financing from + # Stripe Capital to a Connected account. This resource represents + # the terms accepted by the Connected account, which may differ from those + # offered. + attr_reader :accepted_terms + sig { returns(String) } + # The ID of the merchant associated with this financing object. + attr_reader :account + sig { returns(Integer) } + # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. + attr_reader :charged_off_at + sig { returns(Integer) } + # Time at which the offer was created. Given in seconds since unix epoch. + attr_reader :created + sig { returns(Float) } + # Time at which the offer expires. Given in seconds since unix epoch. + attr_reader :expires_after + sig { returns(String) } + # The type of financing being offered. + attr_reader :financing_type + sig { returns(String) } + # A unique identifier for the financing object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The object type: financing_offer. + attr_reader :object + sig { returns(OfferedTerms) } + # This is an object representing the terms of an offer of financing from + # Stripe Capital to a Connected account. This resource represents + # both the terms offered to the Connected account. + attr_reader :offered_terms + sig { returns(String) } + # Financing product identifier. + attr_reader :product_type + sig { returns(String) } + # The ID of the financing offer that replaced this offer. + attr_reader :replacement + sig { returns(String) } + # The ID of the financing offer that this offer is a replacement for. + attr_reader :replacement_for + sig { returns(String) } + # The current status of the offer. + attr_reader :status + sig { returns(String) } + # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_summary.rbi b/rbi/stripe/resources/capital/financing_summary.rbi new file mode 100644 index 000000000..b22c9389d --- /dev/null +++ b/rbi/stripe/resources/capital/financing_summary.rbi @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Capital + # A financing object describes an account's current financing state. Used by Connect + # platforms to read the state of Capital offered to their connected accounts. + class FinancingSummary < SingletonAPIResource + class Details < Stripe::StripeObject + class CurrentRepaymentInterval < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :due_at + sig { returns(T.nilable(Integer)) } + attr_reader :paid_amount + sig { returns(Integer) } + attr_reader :remaining_amount + end + sig { returns(Integer) } + attr_reader :advance_amount + sig { returns(T.nilable(Integer)) } + attr_reader :advance_paid_out_at + sig { returns(String) } + attr_reader :currency + sig { returns(T.nilable(CurrentRepaymentInterval)) } + attr_reader :current_repayment_interval + sig { returns(Integer) } + attr_reader :fee_amount + sig { returns(Integer) } + attr_reader :paid_amount + sig { returns(Integer) } + attr_reader :remaining_amount + sig { returns(T.nilable(Integer)) } + attr_reader :repayments_begin_at + sig { returns(Float) } + attr_reader :withhold_rate + end + sig { returns(T.nilable(Details)) } + # Additional information about the financing summary. Describes currency, advance amount, + # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, + # repayment start date, and advance payout date. + attr_reader :details + sig { returns(T.nilable(String)) } + # The Financing Offer ID this Financing Summary corresponds to + attr_reader :financing_offer + sig { returns(String) } + # The object type: financing_summary + attr_reader :object + sig { returns(T.nilable(String)) } + # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. + attr_reader :status + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_transaction.rbi b/rbi/stripe/resources/capital/financing_transaction.rbi new file mode 100644 index 000000000..5ff645b9d --- /dev/null +++ b/rbi/stripe/resources/capital/financing_transaction.rbi @@ -0,0 +1,66 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Capital + # This is an object representing the details of a transaction on a Capital financing object. + class FinancingTransaction < APIResource + class Details < Stripe::StripeObject + class Transaction < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :treasury_transaction + end + sig { returns(Integer) } + attr_reader :advance_amount + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :fee_amount + sig { returns(String) } + attr_reader :linked_payment + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :reversed_transaction + sig { returns(Integer) } + attr_reader :total_amount + sig { returns(Transaction) } + attr_reader :transaction + end + sig { returns(String) } + # The ID of the merchant associated with this financing transaction. + attr_reader :account + sig { returns(Integer) } + # Time at which the financing transaction was created. Given in seconds since unix epoch. + attr_reader :created_at + sig { returns(Details) } + # This is an object representing a transaction on a Capital financing offer. + attr_reader :details + sig { returns(T.nilable(String)) } + # The Capital financing offer for this financing transaction. + attr_reader :financing_offer + sig { returns(String) } + # A unique identifier for the financing transaction object. + attr_reader :id + sig { returns(String) } + # The Capital transaction object that predates the Financing Transactions API and + # corresponds with the balance transaction that was created as a result of this + # financing transaction. + attr_reader :legacy_balance_transaction_source + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The object type: financing_transaction + attr_reader :object + sig { returns(String) } + # The type of the financing transaction. + attr_reader :type + sig { returns(T.nilable(String)) } + # A human-friendly description of the financing transaction. + attr_reader :user_facing_description + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/card.rbi b/rbi/stripe/resources/card.rbi new file mode 100644 index 000000000..4b5ba3975 --- /dev/null +++ b/rbi/stripe/resources/card.rbi @@ -0,0 +1,117 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # You can store multiple cards on a customer in order to charge the customer + # later. You can also store multiple debit cards on a recipient in order to + # transfer to those cards later. + # + # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + class Card < APIResource + class Networks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :account + sig { returns(T.nilable(String)) } + # City/District/Suburb/Town/Village. + attr_reader :address_city + sig { returns(T.nilable(String)) } + # Billing address country, if provided when creating card. + attr_reader :address_country + sig { returns(T.nilable(String)) } + # Address line 1 (Street address/PO Box/Company name). + attr_reader :address_line1 + sig { returns(T.nilable(String)) } + # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + # Address line 2 (Apartment/Suite/Unit/Building). + attr_reader :address_line2 + sig { returns(T.nilable(String)) } + # State/County/Province/Region. + attr_reader :address_state + sig { returns(T.nilable(String)) } + # ZIP or postal code. + attr_reader :address_zip + sig { returns(T.nilable(String)) } + # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_zip_check + sig { returns(T.nilable(T::Array[String])) } + # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + attr_reader :available_payout_methods + sig { returns(String) } + # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + attr_reader :brand + sig { returns(T.nilable(String)) } + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + sig { returns(T.nilable(String)) } + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + attr_reader :customer + sig { returns(T.nilable(String)) } + # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + attr_reader :cvc_check + sig { returns(T.nilable(T::Boolean)) } + # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_reader :default_for_currency + sig { returns(String) } + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + sig { returns(T.nilable(String)) } + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + sig { returns(Integer) } + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + sig { returns(Integer) } + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + sig { returns(T.nilable(String)) } + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + sig { returns(String) } + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + sig { returns(String) } + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + sig { returns(String) } + # The last four digits of the card. + attr_reader :last4 + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # Cardholder name. + attr_reader :name + sig { returns(Networks) } + # Attribute for field networks + attr_reader :networks + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. + attr_reader :status + sig { returns(T.nilable(String)) } + # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + attr_reader :tokenization_method + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/cash_balance.rbi b/rbi/stripe/resources/cash_balance.rbi new file mode 100644 index 000000000..d8edc4b12 --- /dev/null +++ b/rbi/stripe/resources/cash_balance.rbi @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + class CashBalance < APIResource + class Settings < Stripe::StripeObject + sig { returns(String) } + attr_reader :reconciliation_mode + sig { returns(T::Boolean) } + attr_reader :using_merchant_default + end + sig { returns(T.nilable(T::Hash[String, Integer])) } + # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :available + sig { returns(String) } + # The ID of the customer whose cash balance this object represents. + attr_reader :customer + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Settings) } + # Attribute for field settings + attr_reader :settings + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi new file mode 100644 index 000000000..d3550e8af --- /dev/null +++ b/rbi/stripe/resources/charge.rbi @@ -0,0 +1,1165 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # The `Charge` object represents a single attempt to move money into your Stripe account. + # PaymentIntent confirmation is the most common way to create Charges, but transferring + # money to a different Stripe account through Connect also creates Charges. + # Some legacy payment flows create Charges directly, which is not recommended for new integrations. + class Charge < APIResource + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class FraudDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :stripe_report + sig { returns(String) } + attr_reader :user_report + end + class Level3 < Stripe::StripeObject + class LineItem < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :discount_amount + sig { returns(String) } + attr_reader :product_code + sig { returns(String) } + attr_reader :product_description + sig { returns(T.nilable(Integer)) } + attr_reader :quantity + sig { returns(T.nilable(Integer)) } + attr_reader :tax_amount + sig { returns(T.nilable(Integer)) } + attr_reader :unit_cost + end + sig { returns(String) } + attr_reader :customer_reference + sig { returns(T::Array[LineItem]) } + attr_reader :line_items + sig { returns(String) } + attr_reader :merchant_reference + sig { returns(String) } + attr_reader :shipping_address_zip + sig { returns(Integer) } + attr_reader :shipping_amount + sig { returns(String) } + attr_reader :shipping_from_zip + end + class Outcome < Stripe::StripeObject + class Rule < Stripe::StripeObject + sig { returns(String) } + attr_reader :action + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :predicate + end + sig { returns(T.nilable(String)) } + attr_reader :network_status + sig { returns(T.nilable(String)) } + attr_reader :reason + sig { returns(String) } + attr_reader :risk_level + sig { returns(Integer) } + attr_reader :risk_score + sig { returns(T.any(String, Rule)) } + attr_reader :rule + sig { returns(T.nilable(String)) } + attr_reader :seller_message + sig { returns(String) } + attr_reader :type + end + class PaymentMethodDetails < Stripe::StripeObject + class AchCreditTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :routing_number + sig { returns(T.nilable(String)) } + attr_reader :swift_code + end + class AchDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + class AcssDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :institution_number + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(String) } + attr_reader :mandate + sig { returns(T.nilable(String)) } + attr_reader :transit_number + end + class Affirm < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class AfterpayClearpay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :order_id + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class Alipay < Stripe::StripeObject + sig { returns(String) } + attr_reader :buyer_id + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBecsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(String) } + attr_reader :mandate + end + class BacsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :mandate + sig { returns(T.nilable(String)) } + attr_reader :sort_code + end + class Bancontact < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_sepa_debit + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + attr_reader :generated_sepa_debit_mandate + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class Blik < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + end + class Boleto < Stripe::StripeObject + sig { returns(String) } + attr_reader :tax_id + end + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + attr_reader :address_postal_code_check + sig { returns(T.nilable(String)) } + attr_reader :cvc_check + end + class DecrementalAuthorization < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + end + class ExtendedAuthorization < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + end + class IncrementalAuthorization < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + end + class Installments < Stripe::StripeObject + class Plan < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :count + sig { returns(T.nilable(String)) } + attr_reader :interval + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Plan)) } + attr_reader :plan + end + class Multicapture < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + end + class NetworkToken < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :used + end + class Overcapture < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :maximum_amount_capturable + sig { returns(String) } + attr_reader :status + end + class ThreeDSecure < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :authentication_flow + sig { returns(T.nilable(String)) } + attr_reader :electronic_commerce_indicator + sig { returns(T.nilable(String)) } + attr_reader :exemption_indicator + sig { returns(T::Boolean) } + attr_reader :exemption_indicator_applied + sig { returns(T.nilable(String)) } + attr_reader :result + sig { returns(T.nilable(String)) } + attr_reader :result_reason + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + sig { returns(T.nilable(String)) } + attr_reader :version + end + class Wallet < Stripe::StripeObject + class AmexExpressCheckout < Stripe::StripeObject; end + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + class Masterpass < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(BillingAddress)) } + attr_reader :billing_address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + class SamsungPay < Stripe::StripeObject; end + class VisaCheckout < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(BillingAddress)) } + attr_reader :billing_address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + sig { returns(AmexExpressCheckout) } + attr_reader :amex_express_checkout + sig { returns(ApplePay) } + attr_reader :apple_pay + sig { returns(T.nilable(String)) } + attr_reader :dynamic_last4 + sig { returns(GooglePay) } + attr_reader :google_pay + sig { returns(Link) } + attr_reader :link + sig { returns(Masterpass) } + attr_reader :masterpass + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(String) } + attr_reader :type + sig { returns(VisaCheckout) } + attr_reader :visa_checkout + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_authorized + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(Integer) } + attr_reader :capture_before + sig { returns(T.nilable(Checks)) } + attr_reader :checks + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(DecrementalAuthorization) } + attr_reader :decremental_authorization + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(ExtendedAuthorization) } + attr_reader :extended_authorization + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(IncrementalAuthorization) } + attr_reader :incremental_authorization + sig { returns(T.nilable(Installments)) } + attr_reader :installments + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :mandate + sig { returns(T.nilable(T::Boolean)) } + attr_reader :moto + sig { returns(Multicapture) } + attr_reader :multicapture + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(NetworkToken)) } + attr_reader :network_token + sig { returns(Overcapture) } + attr_reader :overcapture + sig { returns(T.nilable(ThreeDSecure)) } + attr_reader :three_d_secure + sig { returns(T.nilable(Wallet)) } + attr_reader :wallet + end + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :stored_at + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Receipt < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :application_cryptogram + sig { returns(T.nilable(String)) } + attr_reader :application_preferred_name + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(T.nilable(String)) } + attr_reader :authorization_response_code + sig { returns(T.nilable(String)) } + attr_reader :cardholder_verification_method + sig { returns(T.nilable(String)) } + attr_reader :dedicated_file_name + sig { returns(T.nilable(String)) } + attr_reader :terminal_verification_results + sig { returns(T.nilable(String)) } + attr_reader :transaction_status_information + end + class Wallet < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_authorized + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :brand_product + sig { returns(Integer) } + attr_reader :capture_before + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :emv_auth_data + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :generated_card + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T::Boolean) } + attr_reader :incremental_authorization_supported + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :network_transaction_id + sig { returns(T.nilable(Offline)) } + attr_reader :offline + sig { returns(T::Boolean) } + attr_reader :overcapture_supported + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(T.nilable(Receipt)) } + attr_reader :receipt + sig { returns(Wallet) } + attr_reader :wallet + end + class Cashapp < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + sig { returns(T.nilable(String)) } + attr_reader :cashtag + end + class CustomerBalance < Stripe::StripeObject; end + class Eps < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class Fpx < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(String) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class Giropay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class Gopay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class IdBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :bank + sig { returns(String) } + attr_reader :bank_code + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :display_name + end + class Ideal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_sepa_debit + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + attr_reader :generated_sepa_debit_mandate + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class InteracPresent < Stripe::StripeObject + class Receipt < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :application_cryptogram + sig { returns(T.nilable(String)) } + attr_reader :application_preferred_name + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(T.nilable(String)) } + attr_reader :authorization_response_code + sig { returns(T.nilable(String)) } + attr_reader :cardholder_verification_method + sig { returns(T.nilable(String)) } + attr_reader :dedicated_file_name + sig { returns(T.nilable(String)) } + attr_reader :terminal_verification_results + sig { returns(T.nilable(String)) } + attr_reader :transaction_status_information + end + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :emv_auth_data + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :generated_card + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :network_transaction_id + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(T.nilable(Receipt)) } + attr_reader :receipt + end + class KakaoPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + end + class Klarna < Stripe::StripeObject + class PayerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :country + end + sig { returns(T.nilable(Address)) } + attr_reader :address + end + sig { returns(T.nilable(PayerDetails)) } + attr_reader :payer_details + sig { returns(T.nilable(String)) } + attr_reader :payment_method_category + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + end + class Konbini < Stripe::StripeObject + class Store < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :chain + end + sig { returns(T.nilable(Store)) } + attr_reader :store + end + class KrCard < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class Link < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :country + end + class MbWay < Stripe::StripeObject; end + class Mobilepay < Stripe::StripeObject + class Card < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + sig { returns(T.nilable(Card)) } + attr_reader :card + end + class Multibanco < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :entity + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class NaverPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + end + class Oxxo < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :number + end + class P24 < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class Payco < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + end + class Paynow < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class Paypal < Stripe::StripeObject + class SellerProtection < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :dispute_categories + sig { returns(String) } + attr_reader :status + end + class Shipping < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class VerifiedAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(String)) } + attr_reader :payer_email + sig { returns(T.nilable(String)) } + attr_reader :payer_id + sig { returns(T.nilable(String)) } + attr_reader :payer_name + sig { returns(T.nilable(SellerProtection)) } + attr_reader :seller_protection + sig { returns(T.nilable(Shipping)) } + attr_reader :shipping + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + sig { returns(T.nilable(VerifiedAddress)) } + attr_reader :verified_address + sig { returns(T.nilable(String)) } + attr_reader :verified_email + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class Payto < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(String) } + attr_reader :mandate + sig { returns(T.nilable(String)) } + attr_reader :pay_id + end + class Pix < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_transaction_id + end + class Promptpay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class Qris < Stripe::StripeObject; end + class Rechnung < Stripe::StripeObject; end + class RevolutPay < Stripe::StripeObject; end + class SamsungPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + end + class SepaCreditTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :iban + end + class SepaDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :branch_code + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :mandate + end + class Shopeepay < Stripe::StripeObject; end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_sepa_debit + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + attr_reader :generated_sepa_debit_mandate + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class StripeAccount < Stripe::StripeObject; end + class Swish < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :payment_reference + sig { returns(T.nilable(String)) } + attr_reader :verified_phone_last4 + end + class Twint < Stripe::StripeObject; end + class UsBankAccount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.any(String, Stripe::Mandate)) } + attr_reader :mandate + sig { returns(T.nilable(String)) } + attr_reader :payment_reference + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + class Wechat < Stripe::StripeObject; end + class WechatPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class Zip < Stripe::StripeObject; end + sig { returns(AchCreditTransfer) } + attr_reader :ach_credit_transfer + sig { returns(AchDebit) } + attr_reader :ach_debit + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(Affirm) } + attr_reader :affirm + sig { returns(AfterpayClearpay) } + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + attr_reader :alipay + sig { returns(Alma) } + attr_reader :alma + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Bancontact) } + attr_reader :bancontact + sig { returns(Blik) } + attr_reader :blik + sig { returns(Boleto) } + attr_reader :boleto + sig { returns(Card) } + attr_reader :card + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(CustomerBalance) } + attr_reader :customer_balance + sig { returns(Eps) } + attr_reader :eps + sig { returns(Fpx) } + attr_reader :fpx + sig { returns(Giropay) } + attr_reader :giropay + sig { returns(Gopay) } + attr_reader :gopay + sig { returns(Grabpay) } + attr_reader :grabpay + sig { returns(IdBankTransfer) } + attr_reader :id_bank_transfer + sig { returns(Ideal) } + attr_reader :ideal + sig { returns(InteracPresent) } + attr_reader :interac_present + sig { returns(KakaoPay) } + attr_reader :kakao_pay + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Konbini) } + attr_reader :konbini + sig { returns(KrCard) } + attr_reader :kr_card + sig { returns(Link) } + attr_reader :link + sig { returns(MbWay) } + attr_reader :mb_way + sig { returns(Mobilepay) } + attr_reader :mobilepay + sig { returns(Multibanco) } + attr_reader :multibanco + sig { returns(NaverPay) } + attr_reader :naver_pay + sig { returns(Oxxo) } + attr_reader :oxxo + sig { returns(P24) } + attr_reader :p24 + sig { returns(Payco) } + attr_reader :payco + sig { returns(Paynow) } + attr_reader :paynow + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(Pix) } + attr_reader :pix + sig { returns(Promptpay) } + attr_reader :promptpay + sig { returns(Qris) } + attr_reader :qris + sig { returns(Rechnung) } + attr_reader :rechnung + sig { returns(RevolutPay) } + attr_reader :revolut_pay + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(SepaCreditTransfer) } + attr_reader :sepa_credit_transfer + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(Shopeepay) } + attr_reader :shopeepay + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(StripeAccount) } + attr_reader :stripe_account + sig { returns(Swish) } + attr_reader :swish + sig { returns(Twint) } + attr_reader :twint + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + sig { returns(Wechat) } + attr_reader :wechat + sig { returns(WechatPay) } + attr_reader :wechat_pay + sig { returns(Zip) } + attr_reader :zip + end + class RadarOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :session + end + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(Integer) } + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + sig { returns(Integer) } + # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). + attr_reader :amount_captured + sig { returns(Integer) } + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + attr_reader :amount_refunded + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the charge. + attr_reader :application + sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } + # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + attr_reader :application_fee + sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + attr_reader :application_fee_amount + sig { returns(String) } + # Authorization code on the charge. + attr_reader :authorization_code + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + attr_reader :balance_transaction + sig { returns(BillingDetails) } + # Attribute for field billing_details + attr_reader :billing_details + sig { returns(T.nilable(String)) } + # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + attr_reader :calculated_statement_descriptor + sig { returns(T::Boolean) } + # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + attr_reader :captured + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the customer this charge is for if one exists. + attr_reader :customer + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T::Boolean) } + # Whether the charge has been disputed. + attr_reader :disputed + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + attr_reader :failure_balance_transaction + sig { returns(T.nilable(String)) } + # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). + attr_reader :failure_code + sig { returns(T.nilable(String)) } + # Message to user further explaining reason for charge failure if available. + attr_reader :failure_message + sig { returns(T.nilable(FraudDetails)) } + # Information on fraud assessments for the charge. + attr_reader :fraud_details + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice this charge is for if one exists. + attr_reader :invoice + sig { returns(Level3) } + # Attribute for field level3 + attr_reader :level3 + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_reader :on_behalf_of + sig { returns(T.nilable(Outcome)) } + # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + attr_reader :outcome + sig { returns(T::Boolean) } + # `true` if the charge succeeded, or was successfully authorized for later capture. + attr_reader :paid + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent associated with this charge, if one exists. + attr_reader :payment_intent + sig { returns(T.nilable(String)) } + # ID of the payment method used in this charge. + attr_reader :payment_method + sig { returns(T.nilable(PaymentMethodDetails)) } + # Details about the payment method at the time of the transaction. + attr_reader :payment_method_details + sig { returns(RadarOptions) } + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_reader :radar_options + sig { returns(T.nilable(String)) } + # This is the email address that the receipt for this charge was sent to. + attr_reader :receipt_email + sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. + attr_reader :receipt_number + sig { returns(T.nilable(String)) } + # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + attr_reader :receipt_url + sig { returns(T::Boolean) } + # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + attr_reader :refunded + sig { returns(T.nilable(Stripe::ListObject)) } + # A list of refunds that have been applied to the charge. + attr_reader :refunds + sig { returns(T.nilable(T.any(String, Stripe::Review))) } + # ID of the review associated with this charge if one exists. + attr_reader :review + sig { returns(T.nilable(Shipping)) } + # Shipping information for the charge. + attr_reader :shipping + sig { + returns(T.nilable(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))) + } + # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. + attr_reader :source + sig { returns(T.nilable(T.any(String, Stripe::Transfer))) } + # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + attr_reader :source_transfer + sig { returns(T.nilable(String)) } + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + attr_reader :statement_descriptor_suffix + sig { returns(String) } + # The status of the payment is either `succeeded`, `pending`, or `failed`. + attr_reader :status + sig { returns(T.any(String, Stripe::Transfer)) } + # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + attr_reader :transfer + sig { returns(T.nilable(TransferData)) } + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + attr_reader :transfer_data + sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_reader :transfer_group + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi new file mode 100644 index 000000000..d1d726a96 --- /dev/null +++ b/rbi/stripe/resources/checkout/session.rbi @@ -0,0 +1,949 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Checkout + # A Checkout Session represents your customer's session as they pay for + # one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) + # or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a + # new Session each time your customer attempts to pay. + # + # Once payment is successful, the Checkout Session will contain a reference + # to the [Customer](https://stripe.com/docs/api/customers), and either the successful + # [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active + # [Subscription](https://stripe.com/docs/api/subscriptions). + # + # You can create a Checkout Session on your server and redirect to its URL + # to begin Checkout. + # + # Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) + class Session < APIResource + class AdaptivePricing < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class AfterExpiration < Stripe::StripeObject + class Recovery < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :allow_promotion_codes + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(T.nilable(String)) } + attr_reader :url + end + sig { returns(T.nilable(Recovery)) } + attr_reader :recovery + end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + sig { returns(T.nilable(String)) } + attr_reader :status + end + class CollectedInformation < Stripe::StripeObject + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class TaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(T.nilable(String)) } + attr_reader :value + end + sig { returns(T.nilable(String)) } + attr_reader :business_name + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(ShippingDetails)) } + attr_reader :shipping_details + sig { returns(T.nilable(T::Array[TaxId])) } + attr_reader :tax_ids + end + class Consent < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :promotions + sig { returns(T.nilable(String)) } + attr_reader :terms_of_service + end + class ConsentCollection < Stripe::StripeObject + class PaymentMethodReuseAgreement < Stripe::StripeObject + sig { returns(String) } + attr_reader :position + end + sig { returns(T.nilable(PaymentMethodReuseAgreement)) } + attr_reader :payment_method_reuse_agreement + sig { returns(T.nilable(String)) } + attr_reader :promotions + sig { returns(T.nilable(String)) } + attr_reader :terms_of_service + end + class CurrencyConversion < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(String) } + attr_reader :fx_rate + sig { returns(String) } + attr_reader :source_currency + end + class CustomField < Stripe::StripeObject + class Dropdown < Stripe::StripeObject + class Option < Stripe::StripeObject + sig { returns(String) } + attr_reader :label + sig { returns(String) } + attr_reader :value + end + sig { returns(T.nilable(String)) } + attr_reader :default_value + sig { returns(T::Array[Option]) } + attr_reader :options + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Label < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :custom + sig { returns(String) } + attr_reader :type + end + class Numeric < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :default_value + sig { returns(T.nilable(Integer)) } + attr_reader :maximum_length + sig { returns(T.nilable(Integer)) } + attr_reader :minimum_length + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Text < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :default_value + sig { returns(T.nilable(Integer)) } + attr_reader :maximum_length + sig { returns(T.nilable(Integer)) } + attr_reader :minimum_length + sig { returns(T.nilable(String)) } + attr_reader :value + end + sig { returns(Dropdown) } + attr_reader :dropdown + sig { returns(String) } + attr_reader :key + sig { returns(Label) } + attr_reader :label + sig { returns(Numeric) } + attr_reader :numeric + sig { returns(T::Boolean) } + attr_reader :optional + sig { returns(Text) } + attr_reader :text + sig { returns(String) } + attr_reader :type + end + class CustomText < Stripe::StripeObject + class AfterSubmit < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + class ShippingAddress < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + class Submit < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + class TermsOfServiceAcceptance < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + sig { returns(T.nilable(AfterSubmit)) } + attr_reader :after_submit + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + sig { returns(T.nilable(Submit)) } + attr_reader :submit + sig { returns(T.nilable(TermsOfServiceAcceptance)) } + attr_reader :terms_of_service_acceptance + end + class CustomerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class TaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(T.nilable(String)) } + attr_reader :value + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tax_exempt + sig { returns(T.nilable(T::Array[TaxId])) } + attr_reader :tax_ids + end + class InvoiceCreation < Stripe::StripeObject + class InvoiceData < Stripe::StripeObject + class CustomField < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + class RenderingOptions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :amount_tax_display + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(T.nilable(T::Array[CustomField])) } + attr_reader :custom_fields + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :footer + sig { returns(T.nilable(Issuer)) } + attr_reader :issuer + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(RenderingOptions)) } + attr_reader :rendering_options + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(InvoiceData) } + attr_reader :invoice_data + end + class PaymentMethodConfigurationDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(T.nilable(String)) } + attr_reader :parent + end + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :custom_mandate_url + sig { returns(T::Array[String]) } + attr_reader :default_for + sig { returns(T.nilable(String)) } + attr_reader :interval_description + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(String) } + attr_reader :currency + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :verification_method + end + class Affirm < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class AfterpayClearpay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Alipay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class AmazonPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class AuBecsDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class BacsDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Bancontact < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Boleto < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_after_days + sig { returns(String) } + attr_reader :setup_future_usage + end + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + sig { returns(Installments) } + attr_reader :installments + sig { returns(String) } + attr_reader :request_decremental_authorization + sig { returns(String) } + attr_reader :request_extended_authorization + sig { returns(String) } + attr_reader :request_incremental_authorization + sig { returns(String) } + attr_reader :request_multicapture + sig { returns(String) } + attr_reader :request_overcapture + sig { returns(String) } + attr_reader :request_three_d_secure + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :statement_descriptor_suffix_kana + sig { returns(String) } + attr_reader :statement_descriptor_suffix_kanji + end + class Cashapp < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(T::Array[String]) } + attr_reader :requested_address_types + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :funding_type + sig { returns(String) } + attr_reader :setup_future_usage + end + class Eps < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Fpx < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Giropay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Grabpay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Ideal < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class KakaoPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class Klarna < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Konbini < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :expires_after_days + sig { returns(String) } + attr_reader :setup_future_usage + end + class KrCard < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class Link < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Mobilepay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Multibanco < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class NaverPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class Oxxo < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_after_days + sig { returns(String) } + attr_reader :setup_future_usage + end + class P24 < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Payco < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class Paynow < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Paypal < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(T::Array[String]) } + attr_reader :subsellers + end + class Payto < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :amount_type + sig { returns(T.nilable(String)) } + attr_reader :end_date + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(Integer)) } + attr_reader :payments_per_period + sig { returns(T.nilable(String)) } + attr_reader :purpose + sig { returns(T.nilable(String)) } + attr_reader :start_date + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Pix < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :expires_after_seconds + end + class RevolutPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class SamsungPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Sofort < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Swish < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :account_subcategories + sig { returns(String) } + attr_reader :institution + end + class ManualEntry < Stripe::StripeObject + sig { returns(String) } + attr_reader :mode + end + sig { returns(Filters) } + attr_reader :filters + sig { returns(ManualEntry) } + attr_reader :manual_entry + sig { returns(T::Array[String]) } + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + attr_reader :prefetch + sig { returns(String) } + attr_reader :return_url + end + sig { returns(FinancialConnections) } + attr_reader :financial_connections + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :verification_method + end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(Affirm) } + attr_reader :affirm + sig { returns(AfterpayClearpay) } + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + attr_reader :alipay + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Bancontact) } + attr_reader :bancontact + sig { returns(Boleto) } + attr_reader :boleto + sig { returns(Card) } + attr_reader :card + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(CustomerBalance) } + attr_reader :customer_balance + sig { returns(Eps) } + attr_reader :eps + sig { returns(Fpx) } + attr_reader :fpx + sig { returns(Giropay) } + attr_reader :giropay + sig { returns(Grabpay) } + attr_reader :grabpay + sig { returns(Ideal) } + attr_reader :ideal + sig { returns(KakaoPay) } + attr_reader :kakao_pay + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Konbini) } + attr_reader :konbini + sig { returns(KrCard) } + attr_reader :kr_card + sig { returns(Link) } + attr_reader :link + sig { returns(Mobilepay) } + attr_reader :mobilepay + sig { returns(Multibanco) } + attr_reader :multibanco + sig { returns(NaverPay) } + attr_reader :naver_pay + sig { returns(Oxxo) } + attr_reader :oxxo + sig { returns(P24) } + attr_reader :p24 + sig { returns(Payco) } + attr_reader :payco + sig { returns(Paynow) } + attr_reader :paynow + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(Pix) } + attr_reader :pix + sig { returns(RevolutPay) } + attr_reader :revolut_pay + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(Swish) } + attr_reader :swish + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class Permissions < Stripe::StripeObject + class Update < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :shipping_details + end + sig { returns(T.nilable(Update)) } + attr_reader :update + end + class PhoneNumberCollection < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class SavedPaymentMethodOptions < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :allow_redisplay_filters + sig { returns(T.nilable(String)) } + attr_reader :payment_method_remove + sig { returns(T.nilable(String)) } + attr_reader :payment_method_save + end + class ShippingAddressCollection < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :allowed_countries + end + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } + attr_reader :shipping_rate + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class ShippingOption < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :shipping_amount + sig { returns(T.any(String, Stripe::ShippingRate)) } + attr_reader :shipping_rate + end + class TaxIdCollection < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(String) } + attr_reader :required + end + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::Discount) } + attr_reader :discount + end + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + sig { returns(Integer) } + attr_reader :amount_discount + sig { returns(T.nilable(Integer)) } + attr_reader :amount_shipping + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Breakdown) } + attr_reader :breakdown + end + sig { returns(T.nilable(AdaptivePricing)) } + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + attr_reader :adaptive_pricing + sig { returns(T.nilable(AfterExpiration)) } + # When set, provides configuration for actions to take if this Checkout Session expires. + attr_reader :after_expiration + sig { returns(T.nilable(T::Boolean)) } + # Enables user redeemable promotion codes. + attr_reader :allow_promotion_codes + sig { returns(T.nilable(Integer)) } + # Total of all items before discounts or taxes are applied. + attr_reader :amount_subtotal + sig { returns(T.nilable(Integer)) } + # Total of all items after discounts and taxes are applied. + attr_reader :amount_total + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(T.nilable(String)) } + # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. + attr_reader :billing_address_collection + sig { returns(T.nilable(String)) } + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + attr_reader :cancel_url + sig { returns(T.nilable(String)) } + # A unique string to reference the Checkout Session. This can be a + # customer ID, a cart ID, or similar, and can be used to reconcile the + # Session with your internal systems. + attr_reader :client_reference_id + sig { returns(T.nilable(String)) } + # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + attr_reader :client_secret + sig { returns(T.nilable(CollectedInformation)) } + # Information about the customer collected within the Checkout Session. + attr_reader :collected_information + sig { returns(T.nilable(Consent)) } + # Results of `consent_collection` for this session. + attr_reader :consent + sig { returns(T.nilable(ConsentCollection)) } + # When set, provides configuration for the Checkout Session to gather active consent from customers. + attr_reader :consent_collection + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(CurrencyConversion)) } + # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions + attr_reader :currency_conversion + sig { returns(T::Array[CustomField]) } + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_reader :custom_fields + sig { returns(CustomText) } + # Attribute for field custom_text + attr_reader :custom_text + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer for this Session. + # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout + # will create a new customer object based on information provided + # during the payment flow unless an existing customer was provided when + # the Session was created. + attr_reader :customer + sig { returns(T.nilable(String)) } + # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + attr_reader :customer_creation + sig { returns(T.nilable(CustomerDetails)) } + # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + attr_reader :customer_details + sig { returns(T.nilable(String)) } + # If provided, this value will be used when the Customer object is created. + # If not provided, customers will be asked to enter their email address. + # Use this parameter to prefill customer data if you already have an email + # on file. To access information about the customer once the payment flow is + # complete, use the `customer` attribute. + attr_reader :customer_email + sig { returns(Integer) } + # The timestamp at which the Checkout Session will expire. + attr_reader :expires_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice created by the Checkout Session, if it exists. + attr_reader :invoice + sig { returns(T.nilable(InvoiceCreation)) } + # Details on the state of invoice creation for the Checkout Session. + attr_reader :invoice_creation + sig { returns(Stripe::ListObject) } + # The line items purchased by the customer. + attr_reader :line_items + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + attr_reader :locale + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The mode of the Checkout Session. + attr_reader :mode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + attr_reader :payment_intent + sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) } + # The ID of the Payment Link that created this Session. + attr_reader :payment_link + sig { returns(T.nilable(String)) } + # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + attr_reader :payment_method_collection + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + attr_reader :payment_method_configuration_details + sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + attr_reader :payment_method_options + sig { returns(T::Array[String]) } + # A list of the types of payment methods (e.g. card) this Checkout + # Session is allowed to accept. + attr_reader :payment_method_types + sig { returns(String) } + # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. + # You can use this value to decide when to fulfill your customer's order. + attr_reader :payment_status + sig { returns(T.nilable(Permissions)) } + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + # + # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + attr_reader :permissions + sig { returns(PhoneNumberCollection) } + # Attribute for field phone_number_collection + attr_reader :phone_number_collection + sig { returns(T.nilable(String)) } + # The ID of the original expired Checkout Session that triggered the recovery flow. + attr_reader :recovered_from + sig { returns(String) } + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + attr_reader :redirect_on_completion + sig { returns(String) } + # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + attr_reader :return_url + sig { returns(T.nilable(SavedPaymentMethodOptions)) } + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + attr_reader :saved_payment_method_options + sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } + # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + attr_reader :setup_intent + sig { returns(T.nilable(ShippingAddressCollection)) } + # When set, provides configuration for Checkout to collect a shipping address from a customer. + attr_reader :shipping_address_collection + sig { returns(T.nilable(ShippingCost)) } + # The details of the customer cost of shipping, including the customer chosen ShippingRate. + attr_reader :shipping_cost + sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this Checkout Session. + attr_reader :shipping_details + sig { returns(T::Array[ShippingOption]) } + # The shipping rate options applied to this Session. + attr_reader :shipping_options + sig { returns(T.nilable(String)) } + # The status of the Checkout Session, one of `open`, `complete`, or `expired`. + attr_reader :status + sig { returns(T.nilable(String)) } + # Describes the type of transaction being performed by Checkout in order to customize + # relevant text on the page, such as the submit button. `submit_type` can only be + # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + attr_reader :submit_type + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The ID of the subscription for Checkout Sessions in `subscription` mode. + attr_reader :subscription + sig { returns(T.nilable(String)) } + # The URL the customer will be directed to after the payment or + # subscription creation is successful. + attr_reader :success_url + sig { returns(TaxIdCollection) } + # Attribute for field tax_id_collection + attr_reader :tax_id_collection + sig { returns(T.nilable(TotalDetails)) } + # Tax and discount details for the computed total amount. + attr_reader :total_details + sig { returns(T.nilable(String)) } + # The UI mode of the Session. Defaults to `hosted`. + attr_reader :ui_mode + sig { returns(T.nilable(String)) } + # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + # This value is only present when the session is active. + attr_reader :url + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi new file mode 100644 index 000000000..5a754908e --- /dev/null +++ b/rbi/stripe/resources/climate/order.rbi @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Climate + # Orders represent your intent to purchase a particular Climate product. When you create an order, the + # payment is deducted from your merchant balance. + class Order < APIResource + class Beneficiary < Stripe::StripeObject + sig { returns(String) } + attr_reader :public_name + end + class DeliveryDetail < Stripe::StripeObject + class Location < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(T.nilable(Float)) } + attr_reader :latitude + sig { returns(T.nilable(Float)) } + attr_reader :longitude + sig { returns(T.nilable(String)) } + attr_reader :region + end + sig { returns(Integer) } + attr_reader :delivered_at + sig { returns(T.nilable(Location)) } + attr_reader :location + sig { returns(String) } + attr_reader :metric_tons + sig { returns(T.nilable(String)) } + attr_reader :registry_url + sig { returns(Stripe::Climate::Supplier) } + attr_reader :supplier + end + sig { returns(Integer) } + # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. + attr_reader :amount_fees + sig { returns(Integer) } + # Total amount of the carbon removal in the currency's smallest unit. + attr_reader :amount_subtotal + sig { returns(Integer) } + # Total amount of the order including fees in the currency's smallest unit. + attr_reader :amount_total + sig { returns(Beneficiary) } + # Attribute for field beneficiary + attr_reader :beneficiary + sig { returns(T.nilable(Integer)) } + # Time at which the order was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + sig { returns(T.nilable(String)) } + # Reason for the cancellation of this order. + attr_reader :cancellation_reason + sig { returns(T.nilable(String)) } + # For delivered orders, a URL to a delivery certificate for the order. + attr_reader :certificate + sig { returns(T.nilable(Integer)) } + # Time at which the order was confirmed. Measured in seconds since the Unix epoch. + attr_reader :confirmed_at + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + attr_reader :currency + sig { returns(T.nilable(Integer)) } + # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. + attr_reader :delayed_at + sig { returns(T.nilable(Integer)) } + # Time at which the order was delivered. Measured in seconds since the Unix epoch. + attr_reader :delivered_at + sig { returns(T::Array[DeliveryDetail]) } + # Details about the delivery of carbon removal for this order. + attr_reader :delivery_details + sig { returns(Integer) } + # The year this order is expected to be delivered. + attr_reader :expected_delivery_year + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # Quantity of carbon removal that is included in this order. + attr_reader :metric_tons + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.any(String, Stripe::Climate::Product)) } + # Unique ID for the Climate `Product` this order is purchasing. + attr_reader :product + sig { returns(T.nilable(Integer)) } + # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + attr_reader :product_substituted_at + sig { returns(String) } + # The current status of this order. + attr_reader :status + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi new file mode 100644 index 000000000..2fd847030 --- /dev/null +++ b/rbi/stripe/resources/climate/product.rbi @@ -0,0 +1,48 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Climate + # A Climate product represents a type of carbon removal unit available for reservation. + # You can retrieve it to see the current price and availability. + class Product < APIResource + class CurrentPricesPerMetricTon < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount_fees + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_total + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) } + # Current prices for a metric ton of carbon removal in a currency's smallest unit. + attr_reader :current_prices_per_metric_ton + sig { returns(T.nilable(Integer)) } + # The year in which the carbon removal is expected to be delivered. + attr_reader :delivery_year + sig { returns(String) } + # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings + # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) + # for a list of available carbon removal products. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The quantity of metric tons available for reservation. + attr_reader :metric_tons_available + sig { returns(String) } + # The Climate product's name. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[Stripe::Climate::Supplier]) } + # The carbon removal suppliers that fulfill orders for this Climate product. + attr_reader :suppliers + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/climate/supplier.rbi b/rbi/stripe/resources/climate/supplier.rbi new file mode 100644 index 000000000..e644c7343 --- /dev/null +++ b/rbi/stripe/resources/climate/supplier.rbi @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Climate + # A supplier of carbon removal. + class Supplier < APIResource + class Location < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(T.nilable(Float)) } + attr_reader :latitude + sig { returns(T.nilable(Float)) } + attr_reader :longitude + sig { returns(T.nilable(String)) } + attr_reader :region + end + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # Link to a webpage to learn more about the supplier. + attr_reader :info_url + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Array[Location]) } + # The locations in which this supplier operates. + attr_reader :locations + sig { returns(String) } + # Name of this carbon removal supplier. + attr_reader :name + sig { returns(String) } + # String representing the object’s type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The scientific pathway used for carbon removal. + attr_reader :removal_pathway + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi new file mode 100644 index 000000000..75646a38e --- /dev/null +++ b/rbi/stripe/resources/confirmation_token.rbi @@ -0,0 +1,796 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # ConfirmationTokens help transport client side data collected by Stripe JS over + # to your server for confirming a PaymentIntent or SetupIntent. If the confirmation + # is successful, values present on the ConfirmationToken are written onto the Intent. + # + # To learn more about how to use ConfirmationToken, visit the related guides: + # - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) + # - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation). + class ConfirmationToken < APIResource + class MandateData < Stripe::StripeObject + class CustomerAcceptance < Stripe::StripeObject + class Online < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :ip_address + sig { returns(T.nilable(String)) } + attr_reader :user_agent + end + sig { returns(T.nilable(Online)) } + attr_reader :online + sig { returns(String) } + attr_reader :type + end + sig { returns(CustomerAcceptance) } + attr_reader :customer_acceptance + end + class PaymentMethodOptions < Stripe::StripeObject + class Card < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :cvc_token + end + sig { returns(T.nilable(Card)) } + attr_reader :card + end + class PaymentMethodPreview < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :institution_number + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :transit_number + end + class Affirm < Stripe::StripeObject; end + class AfterpayClearpay < Stripe::StripeObject; end + class Alipay < Stripe::StripeObject; end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBecsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class BacsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :sort_code + end + class Bancontact < Stripe::StripeObject; end + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class Blik < Stripe::StripeObject; end + class Boleto < Stripe::StripeObject + sig { returns(String) } + attr_reader :tax_id + end + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + attr_reader :address_postal_code_check + sig { returns(T.nilable(String)) } + attr_reader :cvc_check + end + class GeneratedFrom < Stripe::StripeObject + class PaymentMethodDetails < Stripe::StripeObject + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :stored_at + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Receipt < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :application_cryptogram + sig { returns(T.nilable(String)) } + attr_reader :application_preferred_name + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(T.nilable(String)) } + attr_reader :authorization_response_code + sig { returns(T.nilable(String)) } + attr_reader :cardholder_verification_method + sig { returns(T.nilable(String)) } + attr_reader :dedicated_file_name + sig { returns(T.nilable(String)) } + attr_reader :terminal_verification_results + sig { returns(T.nilable(String)) } + attr_reader :transaction_status_information + end + class Wallet < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_authorized + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :brand_product + sig { returns(Integer) } + attr_reader :capture_before + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :emv_auth_data + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :generated_card + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T::Boolean) } + attr_reader :incremental_authorization_supported + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :network_transaction_id + sig { returns(T.nilable(Offline)) } + attr_reader :offline + sig { returns(T::Boolean) } + attr_reader :overcapture_supported + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(T.nilable(Receipt)) } + attr_reader :receipt + sig { returns(Wallet) } + attr_reader :wallet + end + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(String)) } + attr_reader :charge + sig { returns(T.nilable(PaymentMethodDetails)) } + attr_reader :payment_method_details + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + attr_reader :setup_attempt + end + class Networks < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :available + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + class ThreeDSecureUsage < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :supported + end + class Wallet < Stripe::StripeObject + class AmexExpressCheckout < Stripe::StripeObject; end + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + class Masterpass < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(BillingAddress)) } + attr_reader :billing_address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + class SamsungPay < Stripe::StripeObject; end + class VisaCheckout < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(BillingAddress)) } + attr_reader :billing_address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + sig { returns(AmexExpressCheckout) } + attr_reader :amex_express_checkout + sig { returns(ApplePay) } + attr_reader :apple_pay + sig { returns(T.nilable(String)) } + attr_reader :dynamic_last4 + sig { returns(GooglePay) } + attr_reader :google_pay + sig { returns(Link) } + attr_reader :link + sig { returns(Masterpass) } + attr_reader :masterpass + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(String) } + attr_reader :type + sig { returns(VisaCheckout) } + attr_reader :visa_checkout + end + sig { returns(String) } + attr_reader :brand + sig { returns(T.nilable(Checks)) } + attr_reader :checks + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :display_brand + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(String) } + attr_reader :funding + sig { returns(T.nilable(GeneratedFrom)) } + attr_reader :generated_from + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(String) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(ThreeDSecureUsage)) } + attr_reader :three_d_secure_usage + sig { returns(T.nilable(Wallet)) } + attr_reader :wallet + end + class CardPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :available + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + class Offline < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :stored_at + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Wallet < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :brand_product + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(Offline)) } + attr_reader :offline + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(Wallet) } + attr_reader :wallet + end + class Cashapp < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + sig { returns(T.nilable(String)) } + attr_reader :cashtag + end + class CustomerBalance < Stripe::StripeObject; end + class Eps < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + end + class Fpx < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(String) } + attr_reader :bank + end + class Giropay < Stripe::StripeObject; end + class Gopay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject; end + class IdBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :display_name + end + class Ideal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bic + end + class InteracPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :available + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + end + class KakaoPay < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + sig { returns(T.nilable(Dob)) } + attr_reader :dob + end + class Konbini < Stripe::StripeObject; end + class KrCard < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class Link < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(String) } + attr_reader :persistent_token + end + class MbWay < Stripe::StripeObject; end + class Mobilepay < Stripe::StripeObject; end + class Multibanco < Stripe::StripeObject; end + class NaverPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :funding + end + class Oxxo < Stripe::StripeObject; end + class P24 < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + end + class Payco < Stripe::StripeObject; end + class Paynow < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :payer_email + sig { returns(T.nilable(String)) } + attr_reader :payer_id + sig { returns(T.nilable(String)) } + attr_reader :verified_email + end + class Payto < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :pay_id + end + class Pix < Stripe::StripeObject; end + class Promptpay < Stripe::StripeObject; end + class Qris < Stripe::StripeObject; end + class Rechnung < Stripe::StripeObject + class Dob < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :day + sig { returns(Integer) } + attr_reader :month + sig { returns(Integer) } + attr_reader :year + end + sig { returns(Dob) } + attr_reader :dob + end + class RevolutPay < Stripe::StripeObject; end + class SamsungPay < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject + class GeneratedFrom < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + attr_reader :charge + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + attr_reader :setup_attempt + end + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :branch_code + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(GeneratedFrom)) } + attr_reader :generated_from + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class Shopeepay < Stripe::StripeObject; end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :country + end + class Swish < Stripe::StripeObject; end + class Twint < Stripe::StripeObject; end + class UsBankAccount < Stripe::StripeObject + class Networks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :preferred + sig { returns(T::Array[String]) } + attr_reader :supported + end + class StatusDetails < Stripe::StripeObject + class Blocked < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :network_code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + sig { returns(Blocked) } + attr_reader :blocked + end + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :financial_connections_account + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(String)) } + attr_reader :routing_number + sig { returns(T.nilable(StatusDetails)) } + attr_reader :status_details + end + class WechatPay < Stripe::StripeObject; end + class Zip < Stripe::StripeObject; end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(Affirm) } + attr_reader :affirm + sig { returns(AfterpayClearpay) } + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + attr_reader :alipay + sig { returns(String) } + attr_reader :allow_redisplay + sig { returns(Alma) } + attr_reader :alma + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Bancontact) } + attr_reader :bancontact + sig { returns(BillingDetails) } + attr_reader :billing_details + sig { returns(Blik) } + attr_reader :blik + sig { returns(Boleto) } + attr_reader :boleto + sig { returns(Card) } + attr_reader :card + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + attr_reader :customer + sig { returns(CustomerBalance) } + attr_reader :customer_balance + sig { returns(Eps) } + attr_reader :eps + sig { returns(Fpx) } + attr_reader :fpx + sig { returns(Giropay) } + attr_reader :giropay + sig { returns(Gopay) } + attr_reader :gopay + sig { returns(Grabpay) } + attr_reader :grabpay + sig { returns(IdBankTransfer) } + attr_reader :id_bank_transfer + sig { returns(Ideal) } + attr_reader :ideal + sig { returns(InteracPresent) } + attr_reader :interac_present + sig { returns(KakaoPay) } + attr_reader :kakao_pay + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Konbini) } + attr_reader :konbini + sig { returns(KrCard) } + attr_reader :kr_card + sig { returns(Link) } + attr_reader :link + sig { returns(MbWay) } + attr_reader :mb_way + sig { returns(Mobilepay) } + attr_reader :mobilepay + sig { returns(Multibanco) } + attr_reader :multibanco + sig { returns(NaverPay) } + attr_reader :naver_pay + sig { returns(Oxxo) } + attr_reader :oxxo + sig { returns(P24) } + attr_reader :p24 + sig { returns(Payco) } + attr_reader :payco + sig { returns(Paynow) } + attr_reader :paynow + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(Pix) } + attr_reader :pix + sig { returns(Promptpay) } + attr_reader :promptpay + sig { returns(Qris) } + attr_reader :qris + sig { returns(Rechnung) } + attr_reader :rechnung + sig { returns(RevolutPay) } + attr_reader :revolut_pay + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(Shopeepay) } + attr_reader :shopeepay + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(Swish) } + attr_reader :swish + sig { returns(Twint) } + attr_reader :twint + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + sig { returns(WechatPay) } + attr_reader :wechat_pay + sig { returns(Zip) } + attr_reader :zip + end + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(Integer)) } + # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + attr_reader :expires_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(MandateData)) } + # Data used for generating a Mandate. + attr_reader :mandate_data + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + attr_reader :payment_intent + sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for this ConfirmationToken. + attr_reader :payment_method_options + sig { returns(T.nilable(PaymentMethodPreview)) } + # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + attr_reader :payment_method_preview + sig { returns(T.nilable(String)) } + # Return URL used to confirm the Intent. + attr_reader :return_url + sig { returns(T.nilable(String)) } + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. + # + # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + attr_reader :setup_future_usage + sig { returns(T.nilable(String)) } + # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + attr_reader :setup_intent + sig { returns(T.nilable(Shipping)) } + # Shipping information collected on this ConfirmationToken. + attr_reader :shipping + sig { returns(T::Boolean) } + # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + attr_reader :use_stripe_sdk + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/country_spec.rbi b/rbi/stripe/resources/country_spec.rbi new file mode 100644 index 000000000..d0428db07 --- /dev/null +++ b/rbi/stripe/resources/country_spec.rbi @@ -0,0 +1,55 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Stripe needs to collect certain pieces of information about each account + # created. These requirements can differ depending on the account's country. The + # Country Specs API makes these rules available to your integration. + # + # You can also view the information from this API call as [an online + # guide](https://stripe.com/docs/connect/required-verification-information). + class CountrySpec < APIResource + class VerificationFields < Stripe::StripeObject + class Company < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :additional + sig { returns(T::Array[String]) } + attr_reader :minimum + end + class Individual < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :additional + sig { returns(T::Array[String]) } + attr_reader :minimum + end + sig { returns(Company) } + attr_reader :company + sig { returns(Individual) } + attr_reader :individual + end + sig { returns(String) } + # The default currency for this country. This applies to both payment methods and bank accounts. + attr_reader :default_currency + sig { returns(String) } + # Unique identifier for the object. Represented as the ISO country code for this country. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Hash[String, T::Array[String]]) } + # Currencies that can be accepted in the specific country (for transfers). + attr_reader :supported_bank_account_currencies + sig { returns(T::Array[String]) } + # Currencies that can be accepted in the specified country (for payments). + attr_reader :supported_payment_currencies + sig { returns(T::Array[String]) } + # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + attr_reader :supported_payment_methods + sig { returns(T::Array[String]) } + # Countries that can accept transfers from the specified country. + attr_reader :supported_transfer_countries + sig { returns(VerificationFields) } + # Attribute for field verification_fields + attr_reader :verification_fields + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/coupon.rbi b/rbi/stripe/resources/coupon.rbi new file mode 100644 index 000000000..ce096c6ea --- /dev/null +++ b/rbi/stripe/resources/coupon.rbi @@ -0,0 +1,72 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A coupon contains information about a percent-off or amount-off discount you + # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + class Coupon < APIResource + class AppliesTo < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :products + end + class CurrencyOptions < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount_off + end + sig { returns(T.nilable(Integer)) } + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + attr_reader :amount_off + sig { returns(AppliesTo) } + # Attribute for field applies_to + attr_reader :applies_to + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + attr_reader :currency + sig { returns(T::Hash[String, CurrencyOptions]) } + # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + sig { returns(String) } + # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + attr_reader :duration + sig { returns(T.nilable(Integer)) } + # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + attr_reader :duration_in_months + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(Integer)) } + # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + attr_reader :max_redemptions + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # Name of the coupon displayed to customers on for instance invoices or receipts. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Float)) } + # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + attr_reader :percent_off + sig { returns(T.nilable(Integer)) } + # Date after which the coupon can no longer be redeemed. + attr_reader :redeem_by + sig { returns(Integer) } + # Number of times this coupon has been applied to a customer. + attr_reader :times_redeemed + sig { returns(T::Boolean) } + # Taking account of the above properties, whether this coupon can still be applied to a customer. + attr_reader :valid + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi new file mode 100644 index 000000000..86361f503 --- /dev/null +++ b/rbi/stripe/resources/credit_note.rbi @@ -0,0 +1,168 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Issue a credit note to adjust an invoice's amount after the invoice is finalized. + # + # Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) + class CreditNote < APIResource + class DiscountAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + end + class PretaxCreditAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } + attr_reader :credit_balance_transaction + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + sig { returns(String) } + attr_reader :type + end + class Refund < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount_refunded + sig { returns(T.any(String, Stripe::Refund)) } + attr_reader :refund + end + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } + attr_reader :shipping_rate + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + class TaxAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T::Boolean) } + attr_reader :inclusive + sig { returns(T.any(String, Stripe::TaxRate)) } + attr_reader :tax_rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. + attr_reader :amount + sig { returns(Integer) } + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer. + attr_reader :customer + sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) } + # Customer balance transaction related to this credit note. + attr_reader :customer_balance_transaction + sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + attr_reader :discount_amount + sig { returns(T::Array[DiscountAmount]) } + # The aggregate amounts calculated per discount for all line items. + attr_reader :discount_amounts + sig { returns(T.nilable(Integer)) } + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_reader :effective_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.any(String, Stripe::Invoice)) } + # ID of the invoice. + attr_reader :invoice + sig { returns(Stripe::ListObject) } + # Line items that make up the credit note + attr_reader :lines + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # Customer-facing text that appears on the credit note PDF. + attr_reader :memo + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + attr_reader :number + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Integer)) } + # Amount that was credited outside of Stripe. + attr_reader :out_of_band_amount + sig { returns(String) } + # The link to download the PDF of the credit note. + attr_reader :pdf + sig { returns(Integer) } + # Attribute for field post_payment_amount + attr_reader :post_payment_amount + sig { returns(Integer) } + # Attribute for field pre_payment_amount + attr_reader :pre_payment_amount + sig { returns(T::Array[PretaxCreditAmount]) } + # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + attr_reader :pretax_credit_amounts + sig { returns(T.nilable(String)) } + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_reader :reason + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # Refund related to this credit note. + attr_reader :refund + sig { returns(T::Array[Refund]) } + # Refunds related to this credit note. + attr_reader :refunds + sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied to the invoice. + attr_reader :shipping_cost + sig { returns(String) } + # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + attr_reader :status + sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + attr_reader :subtotal + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + attr_reader :subtotal_excluding_tax + sig { returns(T::Array[TaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. + attr_reader :tax_amounts + sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + attr_reader :total + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + attr_reader :total_excluding_tax + sig { returns(String) } + # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + attr_reader :type + sig { returns(T.nilable(Integer)) } + # The time that the credit note was voided. + attr_reader :voided_at + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi new file mode 100644 index 000000000..1f7af46e8 --- /dev/null +++ b/rbi/stripe/resources/credit_note_line_item.rbi @@ -0,0 +1,87 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # The credit note line item object + class CreditNoteLineItem < StripeObject + class DiscountAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + end + class PretaxCreditAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } + attr_reader :credit_balance_transaction + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + sig { returns(String) } + attr_reader :type + end + class TaxAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T::Boolean) } + attr_reader :inclusive + sig { returns(T.any(String, Stripe::TaxRate)) } + attr_reader :tax_rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + attr_reader :amount + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. + attr_reader :amount_excluding_tax + sig { returns(T.nilable(String)) } + # Description of the item being credited. + attr_reader :description + sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + attr_reader :discount_amount + sig { returns(T::Array[DiscountAmount]) } + # The amount of discount calculated per discount for this line item + attr_reader :discount_amounts + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # ID of the invoice line item being credited + attr_reader :invoice_line_item + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[PretaxCreditAmount]) } + # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + attr_reader :pretax_credit_amounts + sig { returns(T.nilable(Integer)) } + # The number of units of product being credited. + attr_reader :quantity + sig { returns(T::Array[TaxAmount]) } + # The amount of tax calculated per tax rate for this line item + attr_reader :tax_amounts + sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates which apply to the line item. + attr_reader :tax_rates + sig { returns(String) } + # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + attr_reader :type + sig { returns(T.nilable(Integer)) } + # The cost of each unit of product being credited. + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + sig { returns(T.nilable(String)) } + # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. + attr_reader :unit_amount_excluding_tax + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/customer.rbi b/rbi/stripe/resources/customer.rbi new file mode 100644 index 000000000..9c7a45c2b --- /dev/null +++ b/rbi/stripe/resources/customer.rbi @@ -0,0 +1,182 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, + # and track payments that belong to the same customer. + class Customer < APIResource + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class InvoiceSettings < Stripe::StripeObject + class CustomField < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + class RenderingOptions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :amount_tax_display + sig { returns(T.nilable(String)) } + attr_reader :template + end + sig { returns(T.nilable(T::Array[CustomField])) } + attr_reader :custom_fields + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :default_payment_method + sig { returns(T.nilable(String)) } + attr_reader :footer + sig { returns(T.nilable(RenderingOptions)) } + attr_reader :rendering_options + end + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class Tax < Stripe::StripeObject + class Location < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :source + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(String) } + attr_reader :automatic_tax + sig { returns(T.nilable(String)) } + attr_reader :ip_address + sig { returns(T.nilable(Location)) } + attr_reader :location + end + sig { returns(T.nilable(Address)) } + # The customer's address. + attr_reader :address + sig { returns(Integer) } + # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + attr_reader :balance + sig { returns(T.nilable(Stripe::CashBalance)) } + # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + attr_reader :cash_balance + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + attr_reader :currency + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } + # ID of the default payment source for the customer. + # + # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + attr_reader :default_source + sig { returns(T.nilable(T::Boolean)) } + # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. + # + # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. + # + # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + attr_reader :delinquent + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount active on the customer, if there is one. + attr_reader :discount + sig { returns(T.nilable(String)) } + # The customer's email address. + attr_reader :email + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Hash[String, Integer]) } + # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + attr_reader :invoice_credit_balance + sig { returns(T.nilable(String)) } + # The prefix for the customer used to generate unique invoice numbers. + attr_reader :invoice_prefix + sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings + attr_reader :invoice_settings + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # The customer's full name or business name. + attr_reader :name + sig { returns(Integer) } + # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + attr_reader :next_invoice_sequence + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The customer's phone number. + attr_reader :phone + sig { returns(T.nilable(T::Array[String])) } + # The customer's preferred locales (languages), ordered by preference. + attr_reader :preferred_locales + sig { returns(T.nilable(Shipping)) } + # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + attr_reader :shipping + sig { returns(Stripe::ListObject) } + # The customer's payment sources, if any. + attr_reader :sources + sig { returns(Stripe::ListObject) } + # The customer's current subscriptions, if any. + attr_reader :subscriptions + sig { returns(Tax) } + # Attribute for field tax + attr_reader :tax + sig { returns(T.nilable(String)) } + # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + attr_reader :tax_exempt + sig { returns(Stripe::ListObject) } + # The customer's tax IDs. + attr_reader :tax_ids + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock that this customer belongs to. + attr_reader :test_clock + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_balance_transaction.rbi b/rbi/stripe/resources/customer_balance_transaction.rbi new file mode 100644 index 000000000..32c94e985 --- /dev/null +++ b/rbi/stripe/resources/customer_balance_transaction.rbi @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + # which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + # You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + # or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + # + # Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) + class CustomerBalanceTransaction < APIResource + sig { returns(Integer) } + # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. + attr_reader :amount + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) } + # The ID of the credit note (if any) related to the transaction. + attr_reader :credit_note + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.any(String, Stripe::Customer)) } + # The ID of the customer the transaction belongs to. + attr_reader :customer + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(Integer) } + # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + attr_reader :ending_balance + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the invoice (if any) related to the transaction. + attr_reader :invoice + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_cash_balance_transaction.rbi b/rbi/stripe/resources/customer_cash_balance_transaction.rbi new file mode 100644 index 000000000..8cf3f8daa --- /dev/null +++ b/rbi/stripe/resources/customer_cash_balance_transaction.rbi @@ -0,0 +1,126 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Customers with certain payments enabled have a cash balance, representing funds that were paid + # by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + # represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + # to payments, and refunds to the customer. + class CustomerCashBalanceTransaction < APIResource + class AdjustedForOverdraft < Stripe::StripeObject + sig { returns(T.any(String, Stripe::BalanceTransaction)) } + attr_reader :balance_transaction + sig { returns(T.any(String, Stripe::CustomerCashBalanceTransaction)) } + attr_reader :linked_transaction + end + class AppliedToPayment < Stripe::StripeObject + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + end + class Funded < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :sender_name + end + class GbBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_number_last4 + sig { returns(T.nilable(String)) } + attr_reader :sender_name + sig { returns(T.nilable(String)) } + attr_reader :sort_code + end + class JpBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :sender_bank + sig { returns(T.nilable(String)) } + attr_reader :sender_branch + sig { returns(T.nilable(String)) } + attr_reader :sender_name + end + class UsBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :sender_name + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(GbBankTransfer) } + attr_reader :gb_bank_transfer + sig { returns(JpBankTransfer) } + attr_reader :jp_bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(String) } + attr_reader :type + sig { returns(UsBankTransfer) } + attr_reader :us_bank_transfer + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + end + class RefundedFromPayment < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Refund)) } + attr_reader :refund + end + class TransferredToBalance < Stripe::StripeObject + sig { returns(T.any(String, Stripe::BalanceTransaction)) } + attr_reader :balance_transaction + end + class UnappliedFromPayment < Stripe::StripeObject + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + end + sig { returns(AdjustedForOverdraft) } + # Attribute for field adjusted_for_overdraft + attr_reader :adjusted_for_overdraft + sig { returns(AppliedToPayment) } + # Attribute for field applied_to_payment + attr_reader :applied_to_payment + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.any(String, Stripe::Customer)) } + # The customer whose available cash balance changed as a result of this transaction. + attr_reader :customer + sig { returns(Integer) } + # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :ending_balance + sig { returns(Funded) } + # Attribute for field funded + attr_reader :funded + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(Integer) } + # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + attr_reader :net_amount + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(RefundedFromPayment) } + # Attribute for field refunded_from_payment + attr_reader :refunded_from_payment + sig { returns(TransferredToBalance) } + # Attribute for field transferred_to_balance + attr_reader :transferred_to_balance + sig { returns(String) } + # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + attr_reader :type + sig { returns(UnappliedFromPayment) } + # Attribute for field unapplied_from_payment + attr_reader :unapplied_from_payment + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi new file mode 100644 index 000000000..dd08d9292 --- /dev/null +++ b/rbi/stripe/resources/customer_session.rbi @@ -0,0 +1,72 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access + # control over a Customer. + # + # Related guides: [Customer Session with the Payment Element](https://stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods), + # [Customer Session with the Pricing Table](https://stripe.com/payments/checkout/pricing-table#customer-session), + # [Customer Session with the Buy Button](https://stripe.com/payment-links/buy-button#pass-an-existing-customer). + class CustomerSession < APIResource + class Components < Stripe::StripeObject + class BuyButton < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class PaymentElement < Stripe::StripeObject + class Features < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :payment_method_allow_redisplay_filters + sig { returns(String) } + attr_reader :payment_method_redisplay + sig { returns(T.nilable(Integer)) } + attr_reader :payment_method_redisplay_limit + sig { returns(String) } + attr_reader :payment_method_remove + sig { returns(String) } + attr_reader :payment_method_save + sig { returns(T.nilable(String)) } + attr_reader :payment_method_save_usage + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Features)) } + attr_reader :features + end + class PricingTable < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + sig { returns(BuyButton) } + attr_reader :buy_button + sig { returns(PaymentElement) } + attr_reader :payment_element + sig { returns(PricingTable) } + attr_reader :pricing_table + end + sig { returns(String) } + # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. + # + # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + attr_reader :client_secret + sig { returns(Components) } + # Configuration for the components supported by this Customer Session. + attr_reader :components + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.any(String, Stripe::Customer)) } + # The Customer the Customer Session was created for. + attr_reader :customer + sig { returns(Integer) } + # The timestamp at which this Customer Session will expire. + attr_reader :expires_at + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/discount.rbi b/rbi/stripe/resources/discount.rbi new file mode 100644 index 000000000..941d437d3 --- /dev/null +++ b/rbi/stripe/resources/discount.rbi @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + class Discount < StripeObject + sig { returns(T.nilable(String)) } + # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + attr_reader :checkout_session + sig { returns(Stripe::Coupon) } + # A coupon contains information about a percent-off or amount-off discount you + # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer associated with this discount. + attr_reader :customer + sig { returns(T.nilable(Integer)) } + # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + attr_reader :end + sig { returns(String) } + # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + attr_reader :id + sig { returns(T.nilable(String)) } + # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. + attr_reader :invoice + sig { returns(T.nilable(String)) } + # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + attr_reader :invoice_item + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + # The promotion code applied to create this discount. + attr_reader :promotion_code + sig { returns(Integer) } + # Date that the coupon was applied. + attr_reader :start + sig { returns(T.nilable(String)) } + # The subscription that this coupon is applied to, if it is applied to a particular subscription. + attr_reader :subscription + sig { returns(T.nilable(String)) } + # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + attr_reader :subscription_item + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/dispute.rbi b/rbi/stripe/resources/dispute.rbi new file mode 100644 index 000000000..8e834dc25 --- /dev/null +++ b/rbi/stripe/resources/dispute.rbi @@ -0,0 +1,254 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A dispute occurs when a customer questions your charge with their card issuer. + # When this happens, you have the opportunity to respond to the dispute with + # evidence that shows that the charge is legitimate. + # + # Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) + class Dispute < APIResource + class Evidence < Stripe::StripeObject + class EnhancedEvidence < Stripe::StripeObject + class VisaCompellingEvidence3 < Stripe::StripeObject + class DisputedTransaction < Stripe::StripeObject + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(String)) } + attr_reader :customer_account_id + sig { returns(T.nilable(String)) } + attr_reader :customer_device_fingerprint + sig { returns(T.nilable(String)) } + attr_reader :customer_device_id + sig { returns(T.nilable(String)) } + attr_reader :customer_email_address + sig { returns(T.nilable(String)) } + attr_reader :customer_purchase_ip + sig { returns(T.nilable(String)) } + attr_reader :merchandise_or_services + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + class PriorUndisputedTransaction < Stripe::StripeObject + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(String) } + attr_reader :charge + sig { returns(T.nilable(String)) } + attr_reader :customer_account_id + sig { returns(T.nilable(String)) } + attr_reader :customer_device_fingerprint + sig { returns(T.nilable(String)) } + attr_reader :customer_device_id + sig { returns(T.nilable(String)) } + attr_reader :customer_email_address + sig { returns(T.nilable(String)) } + attr_reader :customer_purchase_ip + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + sig { returns(T.nilable(DisputedTransaction)) } + attr_reader :disputed_transaction + sig { returns(T::Array[PriorUndisputedTransaction]) } + attr_reader :prior_undisputed_transactions + end + sig { returns(VisaCompellingEvidence3) } + attr_reader :visa_compelling_evidence_3 + end + sig { returns(T.nilable(String)) } + attr_reader :access_activity_log + sig { returns(T.nilable(String)) } + attr_reader :billing_address + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :cancellation_policy + sig { returns(T.nilable(String)) } + attr_reader :cancellation_policy_disclosure + sig { returns(T.nilable(String)) } + attr_reader :cancellation_rebuttal + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :customer_communication + sig { returns(T.nilable(String)) } + attr_reader :customer_email_address + sig { returns(T.nilable(String)) } + attr_reader :customer_name + sig { returns(T.nilable(String)) } + attr_reader :customer_purchase_ip + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :customer_signature + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :duplicate_charge_documentation + sig { returns(T.nilable(String)) } + attr_reader :duplicate_charge_explanation + sig { returns(T.nilable(String)) } + attr_reader :duplicate_charge_id + sig { returns(EnhancedEvidence) } + attr_reader :enhanced_evidence + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :receipt + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :refund_policy + sig { returns(T.nilable(String)) } + attr_reader :refund_policy_disclosure + sig { returns(T.nilable(String)) } + attr_reader :refund_refusal_explanation + sig { returns(T.nilable(String)) } + attr_reader :service_date + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :service_documentation + sig { returns(T.nilable(String)) } + attr_reader :shipping_address + sig { returns(T.nilable(String)) } + attr_reader :shipping_carrier + sig { returns(T.nilable(String)) } + attr_reader :shipping_date + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :shipping_documentation + sig { returns(T.nilable(String)) } + attr_reader :shipping_tracking_number + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :uncategorized_file + sig { returns(T.nilable(String)) } + attr_reader :uncategorized_text + end + class EvidenceDetails < Stripe::StripeObject + class EnhancedEligibility < Stripe::StripeObject + class VisaCompellingEvidence3 < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :required_actions + sig { returns(String) } + attr_reader :status + end + sig { returns(VisaCompellingEvidence3) } + attr_reader :visa_compelling_evidence_3 + end + sig { returns(T.nilable(Integer)) } + attr_reader :due_by + sig { returns(EnhancedEligibility) } + attr_reader :enhanced_eligibility + sig { returns(T::Boolean) } + attr_reader :has_evidence + sig { returns(T::Boolean) } + attr_reader :past_due + sig { returns(Integer) } + attr_reader :submission_count + end + class PaymentMethodDetails < Stripe::StripeObject + class AmazonPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :dispute_type + end + class Card < Stripe::StripeObject + sig { returns(String) } + attr_reader :brand + sig { returns(String) } + attr_reader :case_type + sig { returns(T.nilable(String)) } + attr_reader :network_reason_code + end + class Klarna < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reason_code + end + class Paypal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :case_id + sig { returns(T.nilable(String)) } + attr_reader :reason_code + end + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(Card) } + attr_reader :card + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(String) } + attr_reader :type + end + sig { returns(Integer) } + # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + attr_reader :amount + sig { returns(T::Array[Stripe::BalanceTransaction]) } + # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + attr_reader :balance_transactions + sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge that's disputed. + attr_reader :charge + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T::Array[String]) } + # List of eligibility types that are included in `enhanced_evidence`. + attr_reader :enhanced_eligibility_types + sig { returns(Evidence) } + # Attribute for field evidence + attr_reader :evidence + sig { returns(EvidenceDetails) } + # Attribute for field evidence_details + attr_reader :evidence_details + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. + attr_reader :is_charge_refundable + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # Network-dependent reason code for the dispute. + attr_reader :network_reason_code + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent that's disputed. + attr_reader :payment_intent + sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details + attr_reader :payment_method_details + sig { returns(String) } + # Reason given by cardholder for 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`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). + attr_reader :reason + sig { returns(String) } + # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. + attr_reader :status + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/active_entitlement.rbi b/rbi/stripe/resources/entitlements/active_entitlement.rbi new file mode 100644 index 000000000..5ebff6bf8 --- /dev/null +++ b/rbi/stripe/resources/entitlements/active_entitlement.rbi @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Entitlements + # An active entitlement describes access to a feature for a customer. + class ActiveEntitlement < APIResource + sig { returns(T.any(String, Stripe::Entitlements::Feature)) } + # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + attr_reader :feature + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # A unique key you provide as your own system identifier. This may be up to 80 characters. + attr_reader :lookup_key + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/feature.rbi b/rbi/stripe/resources/entitlements/feature.rbi new file mode 100644 index 000000000..d31e6d20d --- /dev/null +++ b/rbi/stripe/resources/entitlements/feature.rbi @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Entitlements + # A feature represents a monetizable ability or functionality in your system. + # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + class Feature < APIResource + sig { returns(T::Boolean) } + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + attr_reader :active + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # A unique key you provide as your own system identifier. This may be up to 80 characters. + attr_reader :lookup_key + sig { returns(T::Hash[String, String]) } + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The feature's name, for your own purpose, not meant to be displayable to the customer. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/ephemeral_key.rbi b/rbi/stripe/resources/ephemeral_key.rbi new file mode 100644 index 000000000..4660d6a42 --- /dev/null +++ b/rbi/stripe/resources/ephemeral_key.rbi @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class EphemeralKey < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Integer) } + # Time at which the key will expire. Measured in seconds since the Unix epoch. + attr_reader :expires + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The key's secret. You can use this value to make authorized requests to the Stripe API. + attr_reader :secret + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi new file mode 100644 index 000000000..ef3efe0a8 --- /dev/null +++ b/rbi/stripe/resources/event.rbi @@ -0,0 +1,108 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Events are our way of letting you know when something interesting happens in + # your account. When an interesting event occurs, we create a new `Event` + # object. For example, when a charge succeeds, we create a `charge.succeeded` + # event, and when an invoice payment attempt fails, we create an + # `invoice.payment_failed` event. Certain API requests might create multiple + # events. For example, if you create a new subscription for a + # customer, you receive both a `customer.subscription.created` event and a + # `charge.succeeded` event. + # + # Events occur when the state of another API resource changes. The event's data + # field embeds the resource's state at the time of the change. For + # example, a `charge.succeeded` event contains a charge, and an + # `invoice.payment_failed` event contains an invoice. + # + # As with other API resources, you can use endpoints to retrieve an + # [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) + # from the API. We also have a separate + # [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the + # `Event` objects directly to an endpoint on your server. You can manage + # webhooks in your + # [account settings](https://dashboard.stripe.com/account/webhooks). Learn how + # to [listen for events](https://docs.stripe.com/webhooks) + # so that your integration can automatically trigger reactions. + # + # When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications + # that occur in connected accounts. For these events, there's an + # additional `account` attribute in the received `Event` object. + # + # We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) + # for 30 days. + class Event < APIResource + class Data < Stripe::StripeObject + sig { returns(T::Hash[String, T.any()]) } + attr_reader :object + sig { returns(T::Hash[String, T.any()]) } + attr_reader :previous_attributes + end + class Reason < Stripe::StripeObject + class AutomationAction < Stripe::StripeObject + class StripeSendWebhookCustomEvent < Stripe::StripeObject + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :custom_data + end + sig { returns(StripeSendWebhookCustomEvent) } + attr_reader :stripe_send_webhook_custom_event + sig { returns(String) } + attr_reader :trigger + sig { returns(String) } + attr_reader :type + end + class Request < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :id + sig { returns(T.nilable(String)) } + attr_reader :idempotency_key + end + sig { returns(AutomationAction) } + attr_reader :automation_action + sig { returns(Request) } + attr_reader :request + sig { returns(String) } + attr_reader :type + end + class Request < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :id + sig { returns(T.nilable(String)) } + attr_reader :idempotency_key + end + sig { returns(String) } + # The connected account that originates the event. + attr_reader :account + sig { returns(T.nilable(String)) } + # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + attr_reader :api_version + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Data) } + # Attribute for field data + attr_reader :data + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + attr_reader :pending_webhooks + sig { returns(T.nilable(Reason)) } + # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. + attr_reader :reason + sig { returns(T.nilable(Request)) } + # Information on the API request that triggers the event. + attr_reader :request + sig { returns(String) } + # Description of the event (for example, `invoice.created` or `charge.refunded`). + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/exchange_rate.rbi b/rbi/stripe/resources/exchange_rate.rbi new file mode 100644 index 000000000..69b7bd265 --- /dev/null +++ b/rbi/stripe/resources/exchange_rate.rbi @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # `ExchangeRate` objects allow you to determine the rates that Stripe is currently + # using to convert from one currency to another. Since this number is variable + # throughout the day, there are various reasons why you might want to know the current + # rate (for example, to dynamically price an item for a user with a default + # payment in a foreign currency). + # + # Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details. + # + # *[Note: this integration path is supported but no longer recommended]* Additionally, + # you can guarantee that a charge is made with an exchange rate that you expect is + # current. To do so, you must pass in the exchange_rate to charges endpoints. If the + # value is no longer up to date, the charge won't go through. Please refer to our + # [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details. + # + # ----- + # + #   + # + # *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:* + # + # - *localize prices for processing payments on Stripe* + # - *reconcile Stripe transactions* + # - *determine how much money to send to a connected account* + # - *determine app fees to charge a connected account* + # + # *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* + class ExchangeRate < APIResource + sig { returns(String) } + # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Hash[String, Float]) } + # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + attr_reader :rates + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/file.rbi b/rbi/stripe/resources/file.rbi new file mode 100644 index 000000000..bd64d4fc6 --- /dev/null +++ b/rbi/stripe/resources/file.rbi @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # This object represents files hosted on Stripe's servers. You can upload + # files with the [create file](https://stripe.com/docs/api#create_file) request + # (for example, when uploading dispute evidence). Stripe also + # creates files independently (for example, the results of a [Sigma scheduled + # query](https://stripe.com/docs/api#scheduled_queries)). + # + # Related guide: [File upload guide](https://stripe.com/docs/file-upload) + class File < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(Integer)) } + # The file expires and isn't available at this time in epoch seconds. + attr_reader :expires_at + sig { returns(T.nilable(String)) } + # The suitable name for saving the file to a filesystem. + attr_reader :filename + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(Stripe::ListObject)) } + # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + attr_reader :links + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + attr_reader :purpose + sig { returns(Integer) } + # The size of the file object in bytes. + attr_reader :size + sig { returns(T.nilable(String)) } + # A suitable title for the document. + attr_reader :title + sig { returns(T.nilable(String)) } + # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). + attr_reader :type + sig { returns(T.nilable(String)) } + # Use your live secret API key to download the file from this URL. + attr_reader :url + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/file_link.rbi b/rbi/stripe/resources/file_link.rbi new file mode 100644 index 000000000..737f4e831 --- /dev/null +++ b/rbi/stripe/resources/file_link.rbi @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # To share the contents of a `File` object with non-Stripe users, you can + # create a `FileLink`. `FileLink`s contain a URL that you can use to + # retrieve the contents of the file without authentication. + class FileLink < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T::Boolean) } + # Returns if the link is already expired. + attr_reader :expired + sig { returns(T.nilable(Integer)) } + # Time that the link expires. + attr_reader :expires_at + sig { returns(T.any(String, Stripe::File)) } + # The file object this link points to. + attr_reader :file + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The publicly accessible URL to download the file. + attr_reader :url + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account.rbi b/rbi/stripe/resources/financial_connections/account.rbi new file mode 100644 index 000000000..3031c2089 --- /dev/null +++ b/rbi/stripe/resources/financial_connections/account.rbi @@ -0,0 +1,145 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + class Account < APIResource + class AccountHolder < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(T.any(String, Stripe::Customer)) } + attr_reader :customer + sig { returns(String) } + attr_reader :type + end + class Balance < Stripe::StripeObject + class Cash < Stripe::StripeObject + sig { returns(T.nilable(T::Hash[String, Integer])) } + attr_reader :available + end + class Credit < Stripe::StripeObject + sig { returns(T.nilable(T::Hash[String, Integer])) } + attr_reader :used + end + sig { returns(Integer) } + attr_reader :as_of + sig { returns(Cash) } + attr_reader :cash + sig { returns(Credit) } + attr_reader :credit + sig { returns(T::Hash[String, Integer]) } + attr_reader :current + sig { returns(String) } + attr_reader :type + end + class BalanceRefresh < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :last_attempted_at + sig { returns(T.nilable(Integer)) } + attr_reader :next_refresh_available_at + sig { returns(String) } + attr_reader :status + end + class InferredBalancesRefresh < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :last_attempted_at + sig { returns(T.nilable(Integer)) } + attr_reader :next_refresh_available_at + sig { returns(String) } + attr_reader :status + end + class OwnershipRefresh < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :last_attempted_at + sig { returns(T.nilable(Integer)) } + attr_reader :next_refresh_available_at + sig { returns(String) } + attr_reader :status + end + class TransactionRefresh < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(Integer) } + attr_reader :last_attempted_at + sig { returns(T.nilable(Integer)) } + attr_reader :next_refresh_available_at + sig { returns(String) } + attr_reader :status + end + sig { returns(T.nilable(AccountHolder)) } + # The account holder that this account belongs to. + attr_reader :account_holder + sig { returns(T.nilable(Balance)) } + # The most recent information about the account's balance. + attr_reader :balance + sig { returns(T.nilable(BalanceRefresh)) } + # The state of the most recent attempt to refresh the account balance. + attr_reader :balance_refresh + sig { returns(String) } + # The type of the account. Account category is further divided in `subcategory`. + attr_reader :category + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # A human-readable name that has been assigned to this account, either by the account holder or by the institution. + attr_reader :display_name + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(InferredBalancesRefresh)) } + # The state of the most recent attempt to refresh the account's inferred balance history. + attr_reader :inferred_balances_refresh + sig { returns(String) } + # The name of the institution that holds this account. + attr_reader :institution_name + sig { returns(T.nilable(String)) } + # The last 4 digits of the account number. If present, this will be 4 numeric characters. + attr_reader :last4 + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) } + # The most recent information about the account's owners. + attr_reader :ownership + sig { returns(T.nilable(OwnershipRefresh)) } + # The state of the most recent attempt to refresh the account owners. + attr_reader :ownership_refresh + sig { returns(T.nilable(T::Array[String])) } + # The list of permissions granted by this account. + attr_reader :permissions + sig { returns(String) } + # The status of the link to the account. + attr_reader :status + sig { returns(String) } + # If `category` is `cash`, one of: + # + # - `checking` + # - `savings` + # - `other` + # + # If `category` is `credit`, one of: + # + # - `mortgage` + # - `line_of_credit` + # - `credit_card` + # - `other` + # + # If `category` is `investment` or `other`, this will be `other`. + attr_reader :subcategory + sig { returns(T.nilable(T::Array[String])) } + # The list of data refresh subscriptions requested on this account. + attr_reader :subscriptions + sig { returns(T::Array[String]) } + # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + attr_reader :supported_payment_method_types + sig { returns(T.nilable(TransactionRefresh)) } + # The state of the most recent attempt to refresh the account transactions. + attr_reader :transaction_refresh + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi new file mode 100644 index 000000000..5b55042c0 --- /dev/null +++ b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. + class AccountInferredBalance < APIResource + sig { returns(Integer) } + # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. + attr_reader :as_of + sig { returns(T::Hash[String, Integer]) } + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + attr_reader :current + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account_owner.rbi b/rbi/stripe/resources/financial_connections/account_owner.rbi new file mode 100644 index 000000000..abfba5c53 --- /dev/null +++ b/rbi/stripe/resources/financial_connections/account_owner.rbi @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # Describes an owner of an account. + class AccountOwner < StripeObject + sig { returns(T.nilable(String)) } + # The email address of the owner. + attr_reader :email + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # The full name of the owner. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The ownership object that this owner belongs to. + attr_reader :ownership + sig { returns(T.nilable(String)) } + # The raw phone number of the owner. + attr_reader :phone + sig { returns(T.nilable(String)) } + # The raw physical address of the owner. + attr_reader :raw_address + sig { returns(T.nilable(Integer)) } + # The timestamp of the refresh that updated this owner. + attr_reader :refreshed_at + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account_ownership.rbi b/rbi/stripe/resources/financial_connections/account_ownership.rbi new file mode 100644 index 000000000..fa5843335 --- /dev/null +++ b/rbi/stripe/resources/financial_connections/account_ownership.rbi @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # Describes a snapshot of the owners of an account at a particular point in time. + class AccountOwnership < StripeObject + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Stripe::ListObject) } + # A paginated list of owners for this account. + attr_reader :owners + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/institution.rbi b/rbi/stripe/resources/financial_connections/institution.rbi new file mode 100644 index 000000000..93be85653 --- /dev/null +++ b/rbi/stripe/resources/financial_connections/institution.rbi @@ -0,0 +1,60 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow. + class Institution < APIResource + class Features < Stripe::StripeObject + class Balances < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :supported + end + class Ownership < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :supported + end + class PaymentMethod < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :supported + end + class Transactions < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :supported + end + sig { returns(Balances) } + attr_reader :balances + sig { returns(Ownership) } + attr_reader :ownership + sig { returns(PaymentMethod) } + attr_reader :payment_method + sig { returns(Transactions) } + attr_reader :transactions + end + sig { returns(Features) } + # Attribute for field features + attr_reader :features + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The name of this institution. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[String]) } + # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. + attr_reader :routing_numbers + sig { returns(String) } + # The status of this institution in the Financial Connections authentication flow. + attr_reader :status + sig { returns(T.nilable(String)) } + # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. + attr_reader :url + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/session.rbi b/rbi/stripe/resources/financial_connections/session.rbi new file mode 100644 index 000000000..a9a55db82 --- /dev/null +++ b/rbi/stripe/resources/financial_connections/session.rbi @@ -0,0 +1,81 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + class Session < APIResource + class AccountHolder < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(T.any(String, Stripe::Customer)) } + attr_reader :customer + sig { returns(String) } + attr_reader :type + end + class Filters < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :account_subcategories + sig { returns(T.nilable(T::Array[String])) } + attr_reader :countries + sig { returns(String) } + attr_reader :institution + end + class Limits < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :accounts + end + class ManualEntry < Stripe::StripeObject; end + class StatusDetails < Stripe::StripeObject + class Cancelled < Stripe::StripeObject + sig { returns(String) } + attr_reader :reason + end + sig { returns(Cancelled) } + attr_reader :cancelled + end + sig { returns(T.nilable(AccountHolder)) } + # The account holder for whom accounts are collected in this session. + attr_reader :account_holder + sig { returns(Stripe::ListObject) } + # The accounts that were collected as part of this Session. + attr_reader :accounts + sig { returns(String) } + # A value that will be passed to the client to launch the authentication flow. + attr_reader :client_secret + sig { returns(Filters) } + # Attribute for field filters + attr_reader :filters + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(Limits) } + # Attribute for field limits + attr_reader :limits + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(ManualEntry) } + # Attribute for field manual_entry + attr_reader :manual_entry + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[String]) } + # Permissions requested for accounts collected during this session. + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + sig { returns(String) } + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url + sig { returns(String) } + # The current state of the session. + attr_reader :status + sig { returns(StatusDetails) } + # Attribute for field status_details + attr_reader :status_details + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/transaction.rbi b/rbi/stripe/resources/financial_connections/transaction.rbi new file mode 100644 index 000000000..70313a66e --- /dev/null +++ b/rbi/stripe/resources/financial_connections/transaction.rbi @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # A Transaction represents a real transaction that affects a Financial Connections Account balance. + class Transaction < APIResource + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :posted_at + sig { returns(T.nilable(Integer)) } + attr_reader :void_at + end + sig { returns(String) } + # The ID of the Financial Connections Account this transaction belongs to. + attr_reader :account + sig { returns(Integer) } + # The amount of this transaction, in cents (or local equivalent). + attr_reader :amount + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # The description of this transaction. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The status of the transaction. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(Integer) } + # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + attr_reader :transacted_at + sig { returns(String) } + # The token of the transaction refresh that last updated or created this transaction. + attr_reader :transaction_refresh + sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/forwarding/request.rbi b/rbi/stripe/resources/forwarding/request.rbi new file mode 100644 index 000000000..602ab20f1 --- /dev/null +++ b/rbi/stripe/resources/forwarding/request.rbi @@ -0,0 +1,92 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Forwarding + # Instructs Stripe to make a request on your behalf using the destination URL. The destination URL + # is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials + # provided during onboarding, and injects card details from the payment_method into the request. + # + # Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, + # before storing the request and response data in the forwarding Request object, which are subject to a + # 30-day retention period. + # + # You can provide a Stripe idempotency key to make sure that requests with the same key result in only one + # outbound request. The Stripe idempotency key provided should be unique and different from any idempotency + # keys provided on the underlying third-party request. + # + # Forwarding Requests are synchronous requests that return a response or time out according to + # Stripe's limits. + # + # Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). + class Request < APIResource + class RequestContext < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :destination_duration + sig { returns(String) } + attr_reader :destination_ip_address + end + class RequestDetails < Stripe::StripeObject + class Header < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + sig { returns(String) } + attr_reader :body + sig { returns(T::Array[Header]) } + attr_reader :headers + sig { returns(String) } + attr_reader :http_method + end + class ResponseDetails < Stripe::StripeObject + class Header < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + sig { returns(String) } + attr_reader :body + sig { returns(T::Array[Header]) } + attr_reader :headers + sig { returns(Integer) } + attr_reader :status + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + attr_reader :payment_method + sig { returns(T::Array[String]) } + # The field kinds to be replaced in the forwarded request. + attr_reader :replacements + sig { returns(T.nilable(RequestContext)) } + # Context about the request from Stripe's servers to the destination endpoint. + attr_reader :request_context + sig { returns(T.nilable(RequestDetails)) } + # The request that was sent to the destination endpoint. We redact any sensitive fields. + attr_reader :request_details + sig { returns(T.nilable(ResponseDetails)) } + # The response that the destination endpoint returned to us. We redact any sensitive fields. + attr_reader :response_details + sig { returns(T.nilable(String)) } + # The destination URL for the forwarded request. Must be supported by the config. + attr_reader :url + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi new file mode 100644 index 000000000..d1d45ef34 --- /dev/null +++ b/rbi/stripe/resources/funding_instructions.rbi @@ -0,0 +1,183 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + # automatically applied to future invoices and payments using the `customer_balance` payment method. + # Customers can fund this balance by initiating a bank transfer to any account in the + # `financial_addresses` field. + # Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) + class FundingInstructions < APIResource + class BankTransfer < Stripe::StripeObject + class FinancialAddress < Stripe::StripeObject + class Aba < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :account_type + sig { returns(BankAddress) } + attr_reader :bank_address + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :routing_number + end + class Iban < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :bic + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :iban + end + class SortCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :sort_code + end + class Spei < Stripe::StripeObject + sig { returns(String) } + attr_reader :bank_code + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :clabe + end + class Swift < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :account_type + sig { returns(BankAddress) } + attr_reader :bank_address + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :swift_code + end + class Zengin < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_name + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :branch_code + sig { returns(T.nilable(String)) } + attr_reader :branch_name + end + sig { returns(Aba) } + attr_reader :aba + sig { returns(Iban) } + attr_reader :iban + sig { returns(SortCode) } + attr_reader :sort_code + sig { returns(Spei) } + attr_reader :spei + sig { returns(T::Array[String]) } + attr_reader :supported_networks + sig { returns(Swift) } + attr_reader :swift + sig { returns(String) } + attr_reader :type + sig { returns(Zengin) } + attr_reader :zengin + end + sig { returns(String) } + attr_reader :country + sig { returns(T::Array[FinancialAddress]) } + attr_reader :financial_addresses + sig { returns(String) } + attr_reader :type + end + sig { returns(BankTransfer) } + # Attribute for field bank_transfer + attr_reader :bank_transfer + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # The `funding_type` of the returned instructions + attr_reader :funding_type + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/gift_cards/card.rbi b/rbi/stripe/resources/gift_cards/card.rbi new file mode 100644 index 000000000..9956eccdc --- /dev/null +++ b/rbi/stripe/resources/gift_cards/card.rbi @@ -0,0 +1,70 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module GiftCards + # A gift card represents a single gift card owned by a customer, including the + # remaining balance, gift card code, and whether or not it is active. + class Card < APIResource + class CreatedBy < Stripe::StripeObject + class Checkout < Stripe::StripeObject + sig { returns(String) } + attr_reader :checkout_session + sig { returns(T.nilable(String)) } + attr_reader :line_item + end + class Order < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :line_item + sig { returns(String) } + attr_reader :order + end + class Payment < Stripe::StripeObject + sig { returns(String) } + attr_reader :payment_intent + end + sig { returns(Checkout) } + attr_reader :checkout + sig { returns(Order) } + attr_reader :order + sig { returns(Payment) } + attr_reader :payment + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + # Whether this gift card can be used or not. + attr_reader :active + sig { returns(Integer) } + # The amount of funds available for new transactions. + attr_reader :amount_available + sig { returns(Integer) } + # The amount of funds marked as held. + attr_reader :amount_held + sig { returns(T.nilable(String)) } + # Code used to redeem this gift card. + attr_reader :code + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(CreatedBy)) } + # The related Stripe objects that created this gift card. + attr_reader :created_by + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Stripe::ListObject) } + # Transactions on this gift card. + attr_reader :transactions + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/gift_cards/transaction.rbi b/rbi/stripe/resources/gift_cards/transaction.rbi new file mode 100644 index 000000000..ccd7fe6fa --- /dev/null +++ b/rbi/stripe/resources/gift_cards/transaction.rbi @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module GiftCards + # A gift card transaction represents a single transaction on a referenced gift card. + # A transaction is in one of three states, `confirmed`, `held` or `canceled`. A `confirmed` + # transaction is one that has added/deducted funds. A `held` transaction has created a + # temporary hold on funds, which can then be cancelled or confirmed. A `held` transaction + # can be confirmed into a `confirmed` transaction, or canceled into a `canceled` transaction. + # A `canceled` transaction has no effect on a gift card's balance. + class Transaction < APIResource + class CreatedBy < Stripe::StripeObject + class Checkout < Stripe::StripeObject + sig { returns(String) } + attr_reader :checkout_session + sig { returns(T.nilable(String)) } + attr_reader :line_item + end + class Order < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :line_item + sig { returns(String) } + attr_reader :order + end + class Payment < Stripe::StripeObject + sig { returns(String) } + attr_reader :payment_intent + end + sig { returns(Checkout) } + attr_reader :checkout + sig { returns(Order) } + attr_reader :order + sig { returns(Payment) } + attr_reader :payment + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Integer)) } + # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. + attr_reader :amount + sig { returns(T.nilable(Integer)) } + # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. + attr_reader :confirmed_at + sig { returns(T.nilable(Integer)) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(CreatedBy)) } + # The related Stripe objects that created this gift card transaction. + attr_reader :created_by + sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(String)) } + # The gift card that this transaction occurred on + attr_reader :gift_card + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # Status of this transaction, one of `held`, `confirmed`, or `canceled`. + attr_reader :status + sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_reader :transfer_group + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/identity/verification_report.rbi b/rbi/stripe/resources/identity/verification_report.rbi new file mode 100644 index 000000000..84a90ca1c --- /dev/null +++ b/rbi/stripe/resources/identity/verification_report.rbi @@ -0,0 +1,223 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Identity + # A VerificationReport is the result of an attempt to collect and verify data from a user. + # The collection of verification checks performed is determined from the `type` and `options` + # parameters used. You can find the result of each verification check performed in the + # appropriate sub-resource: `document`, `id_number`, `selfie`. + # + # Each VerificationReport contains a copy of any data collected by the user as well as + # reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) + # API. To configure and create VerificationReports, use the + # [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. + # + # Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). + class VerificationReport < APIResource + class Document < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + class Error < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + class ExpirationDate < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + class IssuedDate < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(Dob)) } + attr_reader :dob + sig { returns(T.nilable(Error)) } + attr_reader :error + sig { returns(T.nilable(ExpirationDate)) } + attr_reader :expiration_date + sig { returns(T.nilable(T::Array[String])) } + attr_reader :files + sig { returns(T.nilable(String)) } + attr_reader :first_name + sig { returns(T.nilable(IssuedDate)) } + attr_reader :issued_date + sig { returns(T.nilable(String)) } + attr_reader :issuing_country + sig { returns(T.nilable(String)) } + attr_reader :last_name + sig { returns(T.nilable(String)) } + attr_reader :number + sig { returns(String) } + attr_reader :status + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Email < Stripe::StripeObject + class Error < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(Error)) } + attr_reader :error + sig { returns(String) } + attr_reader :status + end + class IdNumber < Stripe::StripeObject + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + class Error < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + sig { returns(T.nilable(Dob)) } + attr_reader :dob + sig { returns(T.nilable(Error)) } + attr_reader :error + sig { returns(T.nilable(String)) } + attr_reader :first_name + sig { returns(T.nilable(String)) } + attr_reader :id_number + sig { returns(T.nilable(String)) } + attr_reader :id_number_type + sig { returns(T.nilable(String)) } + attr_reader :last_name + sig { returns(String) } + attr_reader :status + end + class Options < Stripe::StripeObject + class Document < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :allowed_types + sig { returns(T::Boolean) } + attr_reader :require_id_number + sig { returns(T::Boolean) } + attr_reader :require_live_capture + sig { returns(T::Boolean) } + attr_reader :require_matching_selfie + end + class IdNumber < Stripe::StripeObject; end + sig { returns(Document) } + attr_reader :document + sig { returns(IdNumber) } + attr_reader :id_number + end + class Phone < Stripe::StripeObject + class Error < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + sig { returns(T.nilable(Error)) } + attr_reader :error + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(String) } + attr_reader :status + end + class Selfie < Stripe::StripeObject + class Error < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + sig { returns(T.nilable(String)) } + attr_reader :document + sig { returns(T.nilable(Error)) } + attr_reader :error + sig { returns(T.nilable(String)) } + attr_reader :selfie + sig { returns(String) } + attr_reader :status + end + sig { returns(T.nilable(String)) } + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_reader :client_reference_id + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Document) } + # Result from a document check + attr_reader :document + sig { returns(Email) } + # Result from a email check + attr_reader :email + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(IdNumber) } + # Result from an id_number check + attr_reader :id_number + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Options) } + # Attribute for field options + attr_reader :options + sig { returns(Phone) } + # Result from a phone check + attr_reader :phone + sig { returns(Selfie) } + # Result from a selfie check + attr_reader :selfie + sig { returns(String) } + # Type of report. + attr_reader :type + sig { returns(String) } + # The configuration token of a verification flow from the dashboard. + attr_reader :verification_flow + sig { returns(T.nilable(String)) } + # ID of the VerificationSession that created this report. + attr_reader :verification_session + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi new file mode 100644 index 000000000..08c5eb1e4 --- /dev/null +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -0,0 +1,159 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Identity + # A VerificationSession guides you through the process of collecting and verifying the identities + # of your users. It contains details about the type of verification, such as what [verification + # check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for + # each verification in your system. + # + # A VerificationSession transitions through [multiple + # statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through + # the verification flow. The VerificationSession contains the user's verified data after + # verification checks are complete. + # + # Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) + class VerificationSession < APIResource + class LastError < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + class Options < Stripe::StripeObject + class Document < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :allowed_types + sig { returns(T::Boolean) } + attr_reader :require_id_number + sig { returns(T::Boolean) } + attr_reader :require_live_capture + sig { returns(T::Boolean) } + attr_reader :require_matching_selfie + end + class Email < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :require_verification + end + class IdNumber < Stripe::StripeObject; end + class Phone < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :require_verification + end + sig { returns(Document) } + attr_reader :document + sig { returns(Email) } + attr_reader :email + sig { returns(IdNumber) } + attr_reader :id_number + sig { returns(Phone) } + attr_reader :phone + end + class ProvidedDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :email + sig { returns(String) } + attr_reader :phone + end + class Redaction < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + end + class VerifiedOutputs < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(Dob)) } + attr_reader :dob + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :first_name + sig { returns(T.nilable(String)) } + attr_reader :id_number + sig { returns(T.nilable(String)) } + attr_reader :id_number_type + sig { returns(T.nilable(String)) } + attr_reader :last_name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + sig { returns(T.nilable(String)) } + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_reader :client_reference_id + sig { returns(T.nilable(String)) } + # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + attr_reader :client_secret + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(LastError)) } + # If present, this property tells you the last error encountered when processing the verification. + attr_reader :last_error + sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) } + # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + attr_reader :last_verification_report + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Options)) } + # A set of options for the session’s verification checks. + attr_reader :options + sig { returns(T.nilable(ProvidedDetails)) } + # Details provided about the user being verified. These details may be shown to the user. + attr_reader :provided_details + sig { returns(T.nilable(Redaction)) } + # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + attr_reader :redaction + sig { returns(T.nilable(String)) } + # Token referencing a Customer resource. + attr_reader :related_customer + sig { returns(String) } + # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + attr_reader :status + sig { returns(String) } + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + attr_reader :type + sig { returns(T.nilable(String)) } + # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + attr_reader :url + sig { returns(String) } + # The configuration token of a verification flow from the dashboard. + attr_reader :verification_flow + sig { returns(T.nilable(VerifiedOutputs)) } + # The user’s verified data. + attr_reader :verified_outputs + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi new file mode 100644 index 000000000..c7c5c6759 --- /dev/null +++ b/rbi/stripe/resources/invoice.rbi @@ -0,0 +1,670 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Invoices are statements of amounts owed by a customer, and are either + # generated one-off, or generated periodically from a subscription. + # + # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + # that may be caused by subscription upgrades/downgrades (if necessary). + # + # If your invoice is configured to be billed through automatic charges, + # Stripe automatically finalizes your invoice and attempts payment. Note + # that finalizing the invoice, + # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + # not happen immediately as the invoice is created. Stripe waits + # until one hour after the last webhook was successfully sent (or the last + # webhook timed out after failing). If you (and the platforms you may have + # connected to) have no webhooks configured, Stripe waits one hour after + # creation to finalize the invoice. + # + # If your invoice is configured to be billed by sending an email, then based on your + # [email settings](https://dashboard.stripe.com/account/billing/automatic), + # Stripe will email the invoice to your customer and await payment. These + # emails can contain a link to a hosted page to pay the invoice. + # + # Stripe applies any customer credit on the account before determining the + # amount due for the invoice (i.e., the amount that will be actually + # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the + # invoice is automatically marked paid, and we add the amount due to the + # customer's credit balance which is applied to the next invoice. + # + # More details on the customer's credit balance are + # [here](https://stripe.com/docs/billing/customer/balance). + # + # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + class Invoice < APIResource + class AmountsDue < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Integer) } + attr_reader :amount_paid + sig { returns(Integer) } + attr_reader :amount_remaining + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Integer)) } + attr_reader :due_date + sig { returns(T.nilable(Integer)) } + attr_reader :paid_at + sig { returns(String) } + attr_reader :status + end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + sig { returns(T.nilable(String)) } + attr_reader :status + end + class CustomField < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + class CustomerAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class CustomerShipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class CustomerTaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(T.nilable(String)) } + attr_reader :value + end + class FromInvoice < Stripe::StripeObject + sig { returns(String) } + attr_reader :action + sig { returns(T.any(String, Stripe::Invoice)) } + attr_reader :invoice + end + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + class LastFinalizationError < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :decline_code + sig { returns(String) } + attr_reader :doc_url + sig { returns(String) } + attr_reader :message + sig { returns(String) } + attr_reader :param + sig { returns(Stripe::PaymentIntent) } + attr_reader :payment_intent + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :payment_method_type + sig { returns(String) } + attr_reader :request_log_url + sig { returns(Stripe::SetupIntent) } + attr_reader :setup_intent + sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } + attr_reader :source + sig { returns(String) } + attr_reader :type + end + class PaymentSettings < Stripe::StripeObject + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :verification_method + end + class Bancontact < Stripe::StripeObject + sig { returns(String) } + attr_reader :preferred_language + end + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :enabled + end + sig { returns(Installments) } + attr_reader :installments + sig { returns(T.nilable(String)) } + attr_reader :request_three_d_secure + end + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :funding_type + end + class IdBankTransfer < Stripe::StripeObject; end + class Konbini < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :account_subcategories + sig { returns(String) } + attr_reader :institution + end + sig { returns(Filters) } + attr_reader :filters + sig { returns(T::Array[String]) } + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + attr_reader :prefetch + end + sig { returns(FinancialConnections) } + attr_reader :financial_connections + sig { returns(String) } + attr_reader :verification_method + end + sig { returns(T.nilable(AcssDebit)) } + attr_reader :acss_debit + sig { returns(T.nilable(Bancontact)) } + attr_reader :bancontact + sig { returns(T.nilable(Card)) } + attr_reader :card + sig { returns(T.nilable(CustomerBalance)) } + attr_reader :customer_balance + sig { returns(T.nilable(IdBankTransfer)) } + attr_reader :id_bank_transfer + sig { returns(T.nilable(Konbini)) } + attr_reader :konbini + sig { returns(T.nilable(SepaDebit)) } + attr_reader :sepa_debit + sig { returns(T.nilable(UsBankAccount)) } + attr_reader :us_bank_account + end + sig { returns(T.nilable(String)) } + attr_reader :default_mandate + sig { returns(T.nilable(PaymentMethodOptions)) } + attr_reader :payment_method_options + sig { returns(T.nilable(T::Array[String])) } + attr_reader :payment_method_types + end + class Rendering < Stripe::StripeObject + class Pdf < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :page_size + end + sig { returns(T.nilable(String)) } + attr_reader :amount_tax_display + sig { returns(T.nilable(Pdf)) } + attr_reader :pdf + sig { returns(T.nilable(String)) } + attr_reader :template + sig { returns(T.nilable(Integer)) } + attr_reader :template_version + end + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } + attr_reader :shipping_rate + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :finalized_at + sig { returns(T.nilable(Integer)) } + attr_reader :marked_uncollectible_at + sig { returns(T.nilable(Integer)) } + attr_reader :paid_at + sig { returns(T.nilable(Integer)) } + attr_reader :voided_at + end + class SubscriptionDetails < Stripe::StripeObject + class PauseCollection < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + sig { returns(T.nilable(Integer)) } + attr_reader :resumes_at + end + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(PauseCollection)) } + attr_reader :pause_collection + end + class ThresholdReason < Stripe::StripeObject + class ItemReason < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :line_item_ids + sig { returns(Integer) } + attr_reader :usage_gte + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T::Array[ItemReason]) } + attr_reader :item_reasons + end + class TotalDiscountAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + end + class TotalMarginAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Margin)) } + attr_reader :margin + end + class TotalPretaxCreditAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } + attr_reader :credit_balance_transaction + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + sig { returns(T.any(String, Stripe::Margin)) } + attr_reader :margin + sig { returns(String) } + attr_reader :type + end + class TotalTaxAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T::Boolean) } + attr_reader :inclusive + sig { returns(T.any(String, Stripe::TaxRate)) } + attr_reader :tax_rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T.nilable(String)) } + # The country of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_country + sig { returns(T.nilable(String)) } + # The public name of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_name + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_reader :account_tax_ids + sig { returns(Integer) } + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + attr_reader :amount_due + sig { returns(Integer) } + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. + attr_reader :amount_overpaid + sig { returns(Integer) } + # The amount, in cents (or local equivalent), that was paid. + attr_reader :amount_paid + sig { returns(Integer) } + # The difference between amount_due and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + sig { returns(Integer) } + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + sig { returns(T.nilable(T::Array[AmountsDue])) } + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + attr_reader :amounts_due + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the invoice. + attr_reader :application + sig { returns(T.nilable(Integer)) } + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + attr_reader :application_fee_amount + sig { returns(Integer) } + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + attr_reader :attempt_count + sig { returns(T::Boolean) } + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + attr_reader :attempted + sig { returns(T::Boolean) } + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + attr_reader :auto_advance + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(T.nilable(Integer)) } + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + attr_reader :automatically_finalizes_at + sig { returns(T.nilable(String)) } + # Indicates the reason why the invoice was created. + # + # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + # * `subscription_create`: A new subscription was created. + # * `subscription_cycle`: A subscription advanced into a new period. + # * `subscription_threshold`: A subscription reached a billing threshold. + # * `subscription_update`: A subscription was updated. + # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + attr_reader :billing_reason + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the latest charge generated for this invoice, if any. + attr_reader :charge + sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + attr_reader :collection_method + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T::Array[CustomField])) } + # Custom fields displayed on the invoice. + attr_reader :custom_fields + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer who will be billed. + attr_reader :customer + sig { returns(T.nilable(CustomerAddress)) } + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_address + sig { returns(T.nilable(String)) } + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_email + sig { returns(T.nilable(String)) } + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_name + sig { returns(T.nilable(String)) } + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_phone + sig { returns(T.nilable(CustomerShipping)) } + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_shipping + sig { returns(T.nilable(String)) } + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_exempt + sig { returns(T.nilable(T::Array[CustomerTaxId])) } + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_ids + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + attr_reader :default_margins + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_reader :default_source + sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates applied to this invoice, if any. + attr_reader :default_tax_rates + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_reader :description + sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + attr_reader :discount + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(T.nilable(Integer)) } + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + attr_reader :due_date + sig { returns(T.nilable(Integer)) } + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_reader :effective_at + sig { returns(T.nilable(Integer)) } + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :ending_balance + sig { returns(T.nilable(String)) } + # Footer displayed on the invoice. + attr_reader :footer + sig { returns(T.nilable(FromInvoice)) } + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + attr_reader :from_invoice + sig { returns(T.nilable(String)) } + # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :hosted_invoice_url + sig { returns(String) } + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + attr_reader :id + sig { returns(T.nilable(String)) } + # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :invoice_pdf + sig { returns(Issuer) } + # Attribute for field issuer + attr_reader :issuer + sig { returns(T.nilable(LastFinalizationError)) } + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + attr_reader :last_finalization_error + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the most recent non-draft revision of this invoice + attr_reader :latest_revision + sig { returns(Stripe::ListObject) } + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + attr_reader :lines + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(Integer)) } + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + attr_reader :next_payment_attempt + sig { returns(T.nilable(String)) } + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + attr_reader :number + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_reader :on_behalf_of + sig { returns(T::Boolean) } + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + attr_reader :paid + sig { returns(T::Boolean) } + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + attr_reader :paid_out_of_band + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + attr_reader :payment_intent + sig { returns(PaymentSettings) } + # Attribute for field payment_settings + attr_reader :payment_settings + sig { returns(Stripe::ListObject) } + # Payments for this invoice + attr_reader :payments + sig { returns(Integer) } + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_end + sig { returns(Integer) } + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_start + sig { returns(Integer) } + # Total amount of all post-payment credit notes issued for this invoice. + attr_reader :post_payment_credit_notes_amount + sig { returns(Integer) } + # Total amount of all pre-payment credit notes issued for this invoice. + attr_reader :pre_payment_credit_notes_amount + sig { returns(T.nilable(T.any(String, Stripe::Quote))) } + # The quote this invoice was generated from. + attr_reader :quote + sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this invoice. + attr_reader :receipt_number + sig { returns(T.nilable(Rendering)) } + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_reader :rendering + sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied on the invoice. + attr_reader :shipping_cost + sig { returns(T.nilable(ShippingDetails)) } + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_reader :shipping_details + sig { returns(Integer) } + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + attr_reader :starting_balance + sig { returns(T.nilable(String)) } + # Extra information about an invoice for the customer's credit card statement. + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that this invoice was prepared for, if any. + attr_reader :subscription + sig { returns(T.nilable(SubscriptionDetails)) } + # Details about the subscription that created this invoice. + attr_reader :subscription_details + sig { returns(Integer) } + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + attr_reader :subscription_proration_date + sig { returns(Integer) } + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + attr_reader :subtotal + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + attr_reader :subtotal_excluding_tax + sig { returns(T.nilable(Integer)) } + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + attr_reader :tax + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice belongs to. + attr_reader :test_clock + sig { returns(ThresholdReason) } + # Attribute for field threshold_reason + attr_reader :threshold_reason + sig { returns(Integer) } + # Total after discounts and taxes. + attr_reader :total + sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } + # The aggregate amounts calculated per discount across all line items. + attr_reader :total_discount_amounts + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + attr_reader :total_excluding_tax + sig { returns(T.nilable(T::Array[TotalMarginAmount])) } + # The aggregate amounts calculated per margin across all line items. + attr_reader :total_margin_amounts + sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + attr_reader :total_pretax_credit_amounts + sig { returns(T::Array[TotalTaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. + attr_reader :total_tax_amounts + sig { returns(T.nilable(TransferData)) } + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + attr_reader :transfer_data + sig { returns(T.nilable(Integer)) } + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + attr_reader :webhooks_delivered_at + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi new file mode 100644 index 000000000..3afe967c7 --- /dev/null +++ b/rbi/stripe/resources/invoice_item.rbi @@ -0,0 +1,99 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an + # invoice by creating or updating it with an `invoice` field, at which point it will be included as + # [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within + # [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + # + # Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined + # with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge + # or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges + # (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. + # + # Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). + class InvoiceItem < APIResource + class Period < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :end + sig { returns(Integer) } + attr_reader :start + end + sig { returns(Integer) } + # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + attr_reader :amount + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.any(String, Stripe::Customer)) } + # The ID of the customer who will be billed when this invoice item is billed. + attr_reader :customer + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :date + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T::Boolean) } + # If true, discounts will apply to this invoice item. Always false for prorations. + attr_reader :discountable + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } + # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the invoice this invoice item belongs to. + attr_reader :invoice + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + attr_reader :margins + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Period) } + # Attribute for field period + attr_reader :period + sig { returns(T.nilable(Stripe::Plan)) } + # If the invoice item is a proration, the plan of the subscription that the proration was computed for. + attr_reader :plan + sig { returns(T.nilable(Stripe::Price)) } + # The price of the invoice item. + attr_reader :price + sig { returns(T::Boolean) } + # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + attr_reader :proration + sig { returns(Integer) } + # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + attr_reader :quantity + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that this invoice item has been created for, if any. + attr_reader :subscription + sig { returns(String) } + # The subscription item that this invoice item has been created for, if any. + attr_reader :subscription_item + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + attr_reader :tax_rates + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice item belongs to. + attr_reader :test_clock + sig { returns(T.nilable(Integer)) } + # Unit amount (in the `currency` specified) of the invoice item. + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi new file mode 100644 index 000000000..9f4edb3da --- /dev/null +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -0,0 +1,146 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. + # + # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). + class InvoiceLineItem < StripeObject + class DiscountAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + end + class MarginAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Margin)) } + attr_reader :margin + end + class Period < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :end + sig { returns(Integer) } + attr_reader :start + end + class PretaxCreditAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } + attr_reader :credit_balance_transaction + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + sig { returns(T.any(String, Stripe::Margin)) } + attr_reader :margin + sig { returns(String) } + attr_reader :type + end + class ProrationDetails < Stripe::StripeObject + class CreditedItems < Stripe::StripeObject + sig { returns(String) } + attr_reader :invoice + sig { returns(T::Array[String]) } + attr_reader :invoice_line_items + end + sig { returns(T.nilable(CreditedItems)) } + attr_reader :credited_items + end + class TaxAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T::Boolean) } + attr_reader :inclusive + sig { returns(T.any(String, Stripe::TaxRate)) } + attr_reader :tax_rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + # The amount, in cents (or local equivalent). + attr_reader :amount + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. + attr_reader :amount_excluding_tax + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(T::Array[DiscountAmount])) } + # The amount of discount calculated per discount for this line item. + attr_reader :discount_amounts + sig { returns(T::Boolean) } + # If true, discounts will apply to this line item. Always false for prorations. + attr_reader :discountable + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # The ID of the invoice that contains this line item. + attr_reader :invoice + sig { returns(T.any(String, Stripe::InvoiceItem)) } + # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. + attr_reader :invoice_item + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Array[MarginAmount])) } + # The amount of margin calculated per margin for this line item. + attr_reader :margin_amounts + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. + attr_reader :margins + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Period) } + # Attribute for field period + attr_reader :period + sig { returns(T.nilable(Stripe::Plan)) } + # The plan of the subscription, if the line item is a subscription or a proration. + attr_reader :plan + sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + attr_reader :pretax_credit_amounts + sig { returns(T.nilable(Stripe::Price)) } + # The price of the line item. + attr_reader :price + sig { returns(T::Boolean) } + # Whether this is a proration. + attr_reader :proration + sig { returns(T.nilable(ProrationDetails)) } + # Additional details for proration line items + attr_reader :proration_details + sig { returns(T.nilable(Integer)) } + # The quantity of the subscription, if the line item is a subscription or a proration. + attr_reader :quantity + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that the invoice item pertains to, if any. + attr_reader :subscription + sig { returns(T.any(String, Stripe::SubscriptionItem)) } + # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + attr_reader :subscription_item + sig { returns(T::Array[TaxAmount]) } + # The amount of tax calculated per tax rate for this line item + attr_reader :tax_amounts + sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates which apply to the line item. + attr_reader :tax_rates + sig { returns(String) } + # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + attr_reader :type + sig { returns(T.nilable(String)) } + # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. + attr_reader :unit_amount_excluding_tax + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_payment.rbi b/rbi/stripe/resources/invoice_payment.rbi new file mode 100644 index 000000000..c5279bfc1 --- /dev/null +++ b/rbi/stripe/resources/invoice_payment.rbi @@ -0,0 +1,63 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # The invoice payment object + class InvoicePayment < APIResource + class Payment < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Charge)) } + attr_reader :charge + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + sig { returns(T.any(String, Stripe::PaymentRecord)) } + attr_reader :payment_record + sig { returns(String) } + attr_reader :type + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + attr_reader :paid_at + end + sig { returns(T.nilable(Integer)) } + # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. + attr_reader :amount_overpaid + sig { returns(T.nilable(Integer)) } + # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + attr_reader :amount_paid + sig { returns(Integer) } + # Amount intended to be paid toward this invoice, in cents (or local equivalent) + attr_reader :amount_requested + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.any(String, Stripe::Invoice)) } + # The invoice that was paid. + attr_reader :invoice + sig { returns(T.nilable(T::Boolean)) } + # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + attr_reader :is_default + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Payment) } + # Attribute for field payment + attr_reader :payment + sig { returns(String) } + # The status of the payment, one of `open`, `paid`, or `canceled`. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_rendering_template.rbi b/rbi/stripe/resources/invoice_rendering_template.rbi new file mode 100644 index 000000000..1cf4398a7 --- /dev/null +++ b/rbi/stripe/resources/invoice_rendering_template.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates + # can be created from within the Dashboard, and they can be used over the API when creating invoices. + class InvoiceRenderingTemplate < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # A brief description of the template, hidden from customers + attr_reader :nickname + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The status of the template, one of `active` or `archived`. + attr_reader :status + sig { returns(Integer) } + # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + attr_reader :version + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi new file mode 100644 index 000000000..fcc28ce3c --- /dev/null +++ b/rbi/stripe/resources/issuing/authorization.rbi @@ -0,0 +1,291 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + class Authorization < APIResource + class AmountDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :atm_fee + sig { returns(T.nilable(Integer)) } + attr_reader :cashback_amount + end + class Fleet < Stripe::StripeObject + class CardholderPromptData < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :alphanumeric_id + sig { returns(T.nilable(String)) } + attr_reader :driver_id + sig { returns(T.nilable(Integer)) } + attr_reader :odometer + sig { returns(T.nilable(String)) } + attr_reader :unspecified_id + sig { returns(T.nilable(String)) } + attr_reader :user_id + sig { returns(T.nilable(String)) } + attr_reader :vehicle_number + end + class ReportedBreakdown < Stripe::StripeObject + class Fuel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :gross_amount_decimal + end + class NonFuel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :gross_amount_decimal + end + class Tax < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :local_amount_decimal + sig { returns(T.nilable(String)) } + attr_reader :national_amount_decimal + end + sig { returns(T.nilable(Fuel)) } + attr_reader :fuel + sig { returns(T.nilable(NonFuel)) } + attr_reader :non_fuel + sig { returns(T.nilable(Tax)) } + attr_reader :tax + end + sig { returns(T.nilable(CardholderPromptData)) } + attr_reader :cardholder_prompt_data + sig { returns(T.nilable(String)) } + attr_reader :purchase_type + sig { returns(T.nilable(ReportedBreakdown)) } + attr_reader :reported_breakdown + sig { returns(T.nilable(String)) } + attr_reader :service_type + end + class FraudChallenge < Stripe::StripeObject + sig { returns(String) } + attr_reader :channel + sig { returns(String) } + attr_reader :status + sig { returns(T.nilable(String)) } + attr_reader :undeliverable_reason + end + class Fuel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :industry_product_code + sig { returns(T.nilable(String)) } + attr_reader :quantity_decimal + sig { returns(T.nilable(String)) } + attr_reader :type + sig { returns(T.nilable(String)) } + attr_reader :unit + sig { returns(T.nilable(String)) } + attr_reader :unit_cost_decimal + end + class MerchantData < Stripe::StripeObject + sig { returns(String) } + attr_reader :category + sig { returns(String) } + attr_reader :category_code + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(String) } + attr_reader :network_id + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :terminal_id + sig { returns(T.nilable(String)) } + attr_reader :url + end + class NetworkData < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :acquiring_institution_id + sig { returns(T.nilable(String)) } + attr_reader :system_trace_audit_number + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class PendingRequest < Stripe::StripeObject + class AmountDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :atm_fee + sig { returns(T.nilable(Integer)) } + attr_reader :cashback_amount + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(AmountDetails)) } + attr_reader :amount_details + sig { returns(String) } + attr_reader :currency + sig { returns(T::Boolean) } + attr_reader :is_amount_controllable + sig { returns(Integer) } + attr_reader :merchant_amount + sig { returns(String) } + attr_reader :merchant_currency + sig { returns(T.nilable(Integer)) } + attr_reader :network_risk_score + end + class RequestHistory < Stripe::StripeObject + class AmountDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :atm_fee + sig { returns(T.nilable(Integer)) } + attr_reader :cashback_amount + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(AmountDetails)) } + attr_reader :amount_details + sig { returns(T::Boolean) } + attr_reader :approved + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(Integer) } + attr_reader :created + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :merchant_amount + sig { returns(String) } + attr_reader :merchant_currency + sig { returns(T.nilable(Integer)) } + attr_reader :network_risk_score + sig { returns(String) } + attr_reader :reason + sig { returns(T.nilable(String)) } + attr_reader :reason_message + sig { returns(T.nilable(Integer)) } + attr_reader :requested_at + end + class Treasury < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :received_credits + sig { returns(T::Array[String]) } + attr_reader :received_debits + sig { returns(T.nilable(String)) } + attr_reader :transaction + end + class VerificationData < Stripe::StripeObject + class AuthenticationExemption < Stripe::StripeObject + sig { returns(String) } + attr_reader :claimed_by + sig { returns(String) } + attr_reader :type + end + class ThreeDSecure < Stripe::StripeObject + sig { returns(String) } + attr_reader :result + end + sig { returns(String) } + attr_reader :address_line1_check + sig { returns(String) } + attr_reader :address_postal_code_check + sig { returns(T.nilable(AuthenticationExemption)) } + attr_reader :authentication_exemption + sig { returns(String) } + attr_reader :cvc_check + sig { returns(String) } + attr_reader :expiry_check + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(ThreeDSecure)) } + attr_reader :three_d_secure + end + sig { returns(Integer) } + # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + attr_reader :amount + sig { returns(T.nilable(AmountDetails)) } + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + sig { returns(T::Boolean) } + # Whether the authorization has been approved. + attr_reader :approved + sig { returns(String) } + # How the card details were provided. + attr_reader :authorization_method + sig { returns(T::Array[Stripe::BalanceTransaction]) } + # List of balance transactions associated with this authorization. + attr_reader :balance_transactions + sig { returns(Stripe::Issuing::Card) } + # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + attr_reader :card + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } + # The cardholder to whom this authorization belongs. + attr_reader :cardholder + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(Fleet)) } + # Fleet-specific information for authorizations using Fleet cards. + attr_reader :fleet + sig { returns(T.nilable(T::Array[FraudChallenge])) } + # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + attr_reader :fraud_challenges + sig { returns(T.nilable(Fuel)) } + # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + attr_reader :fuel + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(Integer) } + # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + attr_reader :merchant_amount + sig { returns(String) } + # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :merchant_currency + sig { returns(MerchantData) } + # Attribute for field merchant_data + attr_reader :merchant_data + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(NetworkData)) } + # Details about the authorization, such as identifiers, set by the card network. + attr_reader :network_data + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(PendingRequest)) } + # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + attr_reader :pending_request + sig { returns(T::Array[RequestHistory]) } + # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + attr_reader :request_history + sig { returns(String) } + # The current status of the authorization in its lifecycle. + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + attr_reader :token + sig { returns(T::Array[Stripe::Issuing::Transaction]) } + # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + attr_reader :transactions + sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + attr_reader :treasury + sig { returns(VerificationData) } + # Attribute for field verification_data + attr_reader :verification_data + sig { returns(T.nilable(T::Boolean)) } + # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + attr_reader :verified_by_fraud_challenge + sig { returns(T.nilable(String)) } + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + attr_reader :wallet + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/card.rbi b/rbi/stripe/resources/issuing/card.rbi new file mode 100644 index 000000000..a30e71f62 --- /dev/null +++ b/rbi/stripe/resources/issuing/card.rbi @@ -0,0 +1,194 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + class Card < APIResource + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class AddressValidation < Stripe::StripeObject + class NormalizedAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(String) } + attr_reader :mode + sig { returns(T.nilable(NormalizedAddress)) } + attr_reader :normalized_address + sig { returns(T.nilable(String)) } + attr_reader :result + end + class Customs < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :eori_number + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(AddressValidation)) } + attr_reader :address_validation + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(T.nilable(Customs)) } + attr_reader :customs + sig { returns(T.nilable(Integer)) } + attr_reader :eta + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone_number + sig { returns(T.nilable(T::Boolean)) } + attr_reader :require_signature + sig { returns(String) } + attr_reader :service + sig { returns(T.nilable(String)) } + attr_reader :status + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + sig { returns(T.nilable(String)) } + attr_reader :tracking_url + sig { returns(String) } + attr_reader :type + end + class SpendingControls < Stripe::StripeObject + class SpendingLimit < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(T::Array[String])) } + attr_reader :categories + sig { returns(String) } + attr_reader :interval + end + sig { returns(T.nilable(T::Array[String])) } + attr_reader :allowed_categories + sig { returns(T.nilable(T::Array[String])) } + attr_reader :allowed_merchant_countries + sig { returns(T.nilable(T::Array[String])) } + attr_reader :blocked_categories + sig { returns(T.nilable(T::Array[String])) } + attr_reader :blocked_merchant_countries + sig { returns(T.nilable(T::Array[SpendingLimit])) } + attr_reader :spending_limits + sig { returns(T.nilable(String)) } + attr_reader :spending_limits_currency + end + class Wallets < Stripe::StripeObject + class ApplePay < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :eligible + sig { returns(T.nilable(String)) } + attr_reader :ineligible_reason + end + class GooglePay < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :eligible + sig { returns(T.nilable(String)) } + attr_reader :ineligible_reason + end + sig { returns(ApplePay) } + attr_reader :apple_pay + sig { returns(GooglePay) } + attr_reader :google_pay + sig { returns(T.nilable(String)) } + attr_reader :primary_account_identifier + end + sig { returns(String) } + # The brand of the card. + attr_reader :brand + sig { returns(T.nilable(String)) } + # The reason why the card was canceled. + attr_reader :cancellation_reason + sig { returns(Stripe::Issuing::Cardholder) } + # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + # + # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + attr_reader :cardholder + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. + attr_reader :currency + sig { returns(String) } + # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + attr_reader :cvc + sig { returns(Integer) } + # The expiration month of the card. + attr_reader :exp_month + sig { returns(Integer) } + # The expiration year of the card. + attr_reader :exp_year + sig { returns(T.nilable(String)) } + # The financial account this card is attached to. + attr_reader :financial_account + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # The last 4 digits of the card number. + attr_reader :last4 + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + attr_reader :number + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) } + # The personalization design object belonging to this card. + attr_reader :personalization_design + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + # The latest card that replaces this card, if any. + attr_reader :replaced_by + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + # The card this card replaces, if any. + attr_reader :replacement_for + sig { returns(T.nilable(String)) } + # The reason why the previous card needed to be replaced. + attr_reader :replacement_reason + sig { returns(T.nilable(Shipping)) } + # Where and how the card will be shipped. + attr_reader :shipping + sig { returns(SpendingControls) } + # Attribute for field spending_controls + attr_reader :spending_controls + sig { returns(String) } + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + attr_reader :status + sig { returns(String) } + # The type of the card. + attr_reader :type + sig { returns(T.nilable(Wallets)) } + # Information relating to digital wallets (like Apple Pay and Google Pay). + attr_reader :wallets + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/cardholder.rbi b/rbi/stripe/resources/issuing/cardholder.rbi new file mode 100644 index 000000000..f2e6e4615 --- /dev/null +++ b/rbi/stripe/resources/issuing/cardholder.rbi @@ -0,0 +1,153 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. + # + # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + class Cardholder < APIResource + class Billing < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + end + class Company < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :tax_id_provided + end + class Individual < Stripe::StripeObject + class CardIssuing < Stripe::StripeObject + class UserTermsAcceptance < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :date + sig { returns(T.nilable(String)) } + attr_reader :ip + sig { returns(T.nilable(String)) } + attr_reader :user_agent + end + sig { returns(T.nilable(UserTermsAcceptance)) } + attr_reader :user_terms_acceptance + end + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + class Verification < Stripe::StripeObject + class Document < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :back + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :front + end + sig { returns(T.nilable(Document)) } + attr_reader :document + end + sig { returns(T.nilable(CardIssuing)) } + attr_reader :card_issuing + sig { returns(T.nilable(Dob)) } + attr_reader :dob + sig { returns(T.nilable(String)) } + attr_reader :first_name + sig { returns(T.nilable(String)) } + attr_reader :last_name + sig { returns(T.nilable(Verification)) } + attr_reader :verification + end + class Requirements < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason + sig { returns(T.nilable(T::Array[String])) } + attr_reader :past_due + end + class SpendingControls < Stripe::StripeObject + class SpendingLimit < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(T::Array[String])) } + attr_reader :categories + sig { returns(String) } + attr_reader :interval + end + sig { returns(T.nilable(T::Array[String])) } + attr_reader :allowed_categories + sig { returns(T.nilable(T::Array[String])) } + attr_reader :allowed_merchant_countries + sig { returns(T.nilable(T::Array[String])) } + attr_reader :blocked_categories + sig { returns(T.nilable(T::Array[String])) } + attr_reader :blocked_merchant_countries + sig { returns(T.nilable(T::Array[SpendingLimit])) } + attr_reader :spending_limits + sig { returns(T.nilable(String)) } + attr_reader :spending_limits_currency + end + sig { returns(Billing) } + # Attribute for field billing + attr_reader :billing + sig { returns(T.nilable(Company)) } + # Additional information about a `company` cardholder. + attr_reader :company + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # The cardholder's email address. + attr_reader :email + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(Individual)) } + # Additional information about an `individual` cardholder. + attr_reader :individual + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The cardholder's name. This will be printed on cards issued to them. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + attr_reader :phone_number + sig { returns(T.nilable(T::Array[String])) } + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + attr_reader :preferred_locales + sig { returns(Requirements) } + # Attribute for field requirements + attr_reader :requirements + sig { returns(T.nilable(SpendingControls)) } + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_reader :spending_controls + sig { returns(String) } + # Specifies whether to permit authorizations on this cardholder's cards. + attr_reader :status + sig { returns(String) } + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi new file mode 100644 index 000000000..c21690be0 --- /dev/null +++ b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # Every time an applicant submits an application for a Charge Card product your platform offers, or every time your platform takes a proactive credit decision on an existing account, you must record the decision by creating a new `CreditUnderwritingRecord` object on a connected account. + # + # [Follow the guide](https://stripe.com/docs/issuing/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. + class CreditUnderwritingRecord < APIResource + class Application < Stripe::StripeObject + sig { returns(String) } + attr_reader :application_method + sig { returns(String) } + attr_reader :purpose + sig { returns(Integer) } + attr_reader :submitted_at + end + class CreditUser < Stripe::StripeObject + sig { returns(String) } + attr_reader :email + sig { returns(String) } + attr_reader :name + end + class Decision < Stripe::StripeObject + class ApplicationRejected < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reason_other_explanation + sig { returns(T::Array[String]) } + attr_reader :reasons + end + class CreditLimitApproved < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + end + class CreditLimitDecreased < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(T.nilable(String)) } + attr_reader :reason_other_explanation + sig { returns(T::Array[String]) } + attr_reader :reasons + end + class CreditLineClosed < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reason_other_explanation + sig { returns(T::Array[String]) } + attr_reader :reasons + end + sig { returns(T.nilable(ApplicationRejected)) } + attr_reader :application_rejected + sig { returns(T.nilable(CreditLimitApproved)) } + attr_reader :credit_limit_approved + sig { returns(T.nilable(CreditLimitDecreased)) } + attr_reader :credit_limit_decreased + sig { returns(T.nilable(CreditLineClosed)) } + attr_reader :credit_line_closed + sig { returns(String) } + attr_reader :type + end + class UnderwritingException < Stripe::StripeObject + sig { returns(String) } + attr_reader :explanation + sig { returns(String) } + attr_reader :original_decision_type + end + sig { returns(T.nilable(Application)) } + # For decisions triggered by an application, details about the submission. + attr_reader :application + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The event that triggered the underwriting. + attr_reader :created_from + sig { returns(CreditUser) } + # Attribute for field credit_user + attr_reader :credit_user + sig { returns(T.nilable(Integer)) } + # Date when a decision was made. + attr_reader :decided_at + sig { returns(T.nilable(Decision)) } + # Details about the decision. + attr_reader :decision + sig { returns(T.nilable(Integer)) } + # For underwriting initiated by an application, a decision must be taken 30 days after the submission. + attr_reader :decision_deadline + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + attr_reader :regulatory_reporting_file + sig { returns(T.nilable(UnderwritingException)) } + # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_reader :underwriting_exception + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/dispute.rbi b/rbi/stripe/resources/issuing/dispute.rbi new file mode 100644 index 000000000..4dffcf177 --- /dev/null +++ b/rbi/stripe/resources/issuing/dispute.rbi @@ -0,0 +1,173 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. + # + # Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) + class Dispute < APIResource + class Evidence < Stripe::StripeObject + class Canceled < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(T::Boolean)) } + attr_reader :cancellation_policy_provided + sig { returns(T.nilable(String)) } + attr_reader :cancellation_reason + sig { returns(T.nilable(Integer)) } + attr_reader :expected_at + sig { returns(T.nilable(String)) } + attr_reader :explanation + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(String)) } + attr_reader :product_type + sig { returns(T.nilable(String)) } + attr_reader :return_status + sig { returns(T.nilable(Integer)) } + attr_reader :returned_at + end + class Duplicate < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :card_statement + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :cash_receipt + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :check_image + sig { returns(T.nilable(String)) } + attr_reader :explanation + sig { returns(T.nilable(String)) } + attr_reader :original_transaction + end + class Fraudulent < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(String)) } + attr_reader :explanation + end + class MerchandiseNotAsDescribed < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(String)) } + attr_reader :explanation + sig { returns(T.nilable(Integer)) } + attr_reader :received_at + sig { returns(T.nilable(String)) } + attr_reader :return_description + sig { returns(T.nilable(String)) } + attr_reader :return_status + sig { returns(T.nilable(Integer)) } + attr_reader :returned_at + end + class NoValidAuthorization < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(String)) } + attr_reader :explanation + end + class NotReceived < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(Integer)) } + attr_reader :expected_at + sig { returns(T.nilable(String)) } + attr_reader :explanation + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(String)) } + attr_reader :product_type + end + class Other < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(String)) } + attr_reader :explanation + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(T.nilable(String)) } + attr_reader :product_type + end + class ServiceNotAsDescribed < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :additional_documentation + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(String)) } + attr_reader :cancellation_reason + sig { returns(T.nilable(String)) } + attr_reader :explanation + sig { returns(T.nilable(Integer)) } + attr_reader :received_at + end + sig { returns(Canceled) } + attr_reader :canceled + sig { returns(Duplicate) } + attr_reader :duplicate + sig { returns(Fraudulent) } + attr_reader :fraudulent + sig { returns(MerchandiseNotAsDescribed) } + attr_reader :merchandise_not_as_described + sig { returns(NoValidAuthorization) } + attr_reader :no_valid_authorization + sig { returns(NotReceived) } + attr_reader :not_received + sig { returns(Other) } + attr_reader :other + sig { returns(String) } + attr_reader :reason + sig { returns(ServiceNotAsDescribed) } + attr_reader :service_not_as_described + end + class Treasury < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :debit_reversal + sig { returns(String) } + attr_reader :received_debit + end + sig { returns(Integer) } + # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + attr_reader :amount + sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) } + # List of balance transactions associated with the dispute. + attr_reader :balance_transactions + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The currency the `transaction` was made in. + attr_reader :currency + sig { returns(Evidence) } + # Attribute for field evidence + attr_reader :evidence + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + attr_reader :loss_reason + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Current status of the dispute. + attr_reader :status + sig { returns(T.any(String, Stripe::Issuing::Transaction)) } + # The transaction being disputed. + attr_reader :transaction + sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + attr_reader :treasury + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi new file mode 100644 index 000000000..992001c0d --- /dev/null +++ b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects. + class DisputeSettlementDetail < APIResource + sig { returns(Integer) } + # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + attr_reader :amount + sig { returns(String) } + # The card used to make the original transaction. + attr_reader :card + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # The ID of the linked dispute. + attr_reader :dispute + sig { returns(String) } + # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. + attr_reader :event_type + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] + attr_reader :network + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The ID of the linked card network settlement. + attr_reader :settlement + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi new file mode 100644 index 000000000..9450a23d2 --- /dev/null +++ b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. + class FraudLiabilityDebit < APIResource + sig { returns(Integer) } + # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. + attr_reader :balance_transaction + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # The ID of the linked dispute. + attr_reader :dispute + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/personalization_design.rbi b/rbi/stripe/resources/issuing/personalization_design.rbi new file mode 100644 index 000000000..ac18ed2b8 --- /dev/null +++ b/rbi/stripe/resources/issuing/personalization_design.rbi @@ -0,0 +1,71 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. + class PersonalizationDesign < APIResource + class CarrierText < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :footer_body + sig { returns(T.nilable(String)) } + attr_reader :footer_title + sig { returns(T.nilable(String)) } + attr_reader :header_body + sig { returns(T.nilable(String)) } + attr_reader :header_title + end + class Preferences < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :is_default + sig { returns(T.nilable(T::Boolean)) } + attr_reader :is_platform_default + end + class RejectionReasons < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :card_logo + sig { returns(T.nilable(T::Array[String])) } + attr_reader :carrier_text + end + sig { returns(T.nilable(T.any(String, Stripe::File))) } + # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + attr_reader :card_logo + sig { returns(T.nilable(CarrierText)) } + # Hash containing carrier text, for use with physical bundles that support carrier text. + attr_reader :carrier_text + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + attr_reader :lookup_key + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # Friendly display name. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) } + # The physical bundle object belonging to this personalization design. + attr_reader :physical_bundle + sig { returns(Preferences) } + # Attribute for field preferences + attr_reader :preferences + sig { returns(RejectionReasons) } + # Attribute for field rejection_reasons + attr_reader :rejection_reasons + sig { returns(String) } + # Whether this personalization design can be used to create cards. + attr_reader :status + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/physical_bundle.rbi b/rbi/stripe/resources/issuing/physical_bundle.rbi new file mode 100644 index 000000000..a96d675b8 --- /dev/null +++ b/rbi/stripe/resources/issuing/physical_bundle.rbi @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. + class PhysicalBundle < APIResource + class Features < Stripe::StripeObject + sig { returns(String) } + attr_reader :card_logo + sig { returns(String) } + attr_reader :carrier_text + sig { returns(String) } + attr_reader :second_line + end + sig { returns(Features) } + # Attribute for field features + attr_reader :features + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # Friendly display name. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Whether this physical bundle can be used to create cards. + attr_reader :status + sig { returns(String) } + # Whether this physical bundle is a standard Stripe offering or custom-made for you. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/token.rbi b/rbi/stripe/resources/issuing/token.rbi new file mode 100644 index 000000000..aff9f7c9c --- /dev/null +++ b/rbi/stripe/resources/issuing/token.rbi @@ -0,0 +1,120 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. + class Token < APIResource + class NetworkData < Stripe::StripeObject + class Device < Stripe::StripeObject + sig { returns(String) } + attr_reader :device_fingerprint + sig { returns(String) } + attr_reader :ip_address + sig { returns(String) } + attr_reader :location + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :phone_number + sig { returns(String) } + attr_reader :type + end + class Mastercard < Stripe::StripeObject + sig { returns(String) } + attr_reader :card_reference_id + sig { returns(String) } + attr_reader :token_reference_id + sig { returns(String) } + attr_reader :token_requestor_id + sig { returns(String) } + attr_reader :token_requestor_name + end + class Visa < Stripe::StripeObject + sig { returns(String) } + attr_reader :card_reference_id + sig { returns(String) } + attr_reader :token_reference_id + sig { returns(String) } + attr_reader :token_requestor_id + sig { returns(String) } + attr_reader :token_risk_score + end + class WalletProvider < Stripe::StripeObject + class CardholderAddress < Stripe::StripeObject + sig { returns(String) } + attr_reader :line1 + sig { returns(String) } + attr_reader :postal_code + end + sig { returns(String) } + attr_reader :account_id + sig { returns(Integer) } + attr_reader :account_trust_score + sig { returns(String) } + attr_reader :card_number_source + sig { returns(CardholderAddress) } + attr_reader :cardholder_address + sig { returns(String) } + attr_reader :cardholder_name + sig { returns(Integer) } + attr_reader :device_trust_score + sig { returns(String) } + attr_reader :hashed_account_email_address + sig { returns(T::Array[String]) } + attr_reader :reason_codes + sig { returns(String) } + attr_reader :suggested_decision + sig { returns(String) } + attr_reader :suggested_decision_version + end + sig { returns(Device) } + attr_reader :device + sig { returns(Mastercard) } + attr_reader :mastercard + sig { returns(String) } + attr_reader :type + sig { returns(Visa) } + attr_reader :visa + sig { returns(WalletProvider) } + attr_reader :wallet_provider + end + sig { returns(T.any(String, Stripe::Issuing::Card)) } + # Card associated with this token. + attr_reader :card + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # The hashed ID derived from the device ID from the card network associated with the token. + attr_reader :device_fingerprint + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # The last four digits of the token. + attr_reader :last4 + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The token service provider / card network associated with the token. + attr_reader :network + sig { returns(NetworkData) } + # Attribute for field network_data + attr_reader :network_data + sig { returns(Integer) } + # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + attr_reader :network_updated_at + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The usage state of the token. + attr_reader :status + sig { returns(String) } + # The digital wallet for this token, if one was used. + attr_reader :wallet_provider + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi new file mode 100644 index 000000000..28f391abe --- /dev/null +++ b/rbi/stripe/resources/issuing/transaction.rbi @@ -0,0 +1,237 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving + # your Stripe account, such as a completed purchase or refund, is represented by an Issuing + # `Transaction` object. + # + # Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) + class Transaction < APIResource + class AmountDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :atm_fee + sig { returns(T.nilable(Integer)) } + attr_reader :cashback_amount + end + class MerchantData < Stripe::StripeObject + sig { returns(String) } + attr_reader :category + sig { returns(String) } + attr_reader :category_code + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(String) } + attr_reader :network_id + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :terminal_id + sig { returns(T.nilable(String)) } + attr_reader :url + end + class NetworkData < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(T.nilable(String)) } + attr_reader :processing_date + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + end + class PurchaseDetails < Stripe::StripeObject + class Fleet < Stripe::StripeObject + class CardholderPromptData < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :driver_id + sig { returns(T.nilable(Integer)) } + attr_reader :odometer + sig { returns(T.nilable(String)) } + attr_reader :unspecified_id + sig { returns(T.nilable(String)) } + attr_reader :user_id + sig { returns(T.nilable(String)) } + attr_reader :vehicle_number + end + class ReportedBreakdown < Stripe::StripeObject + class Fuel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :gross_amount_decimal + end + class NonFuel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :gross_amount_decimal + end + class Tax < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :local_amount_decimal + sig { returns(T.nilable(String)) } + attr_reader :national_amount_decimal + end + sig { returns(T.nilable(Fuel)) } + attr_reader :fuel + sig { returns(T.nilable(NonFuel)) } + attr_reader :non_fuel + sig { returns(T.nilable(Tax)) } + attr_reader :tax + end + sig { returns(T.nilable(CardholderPromptData)) } + attr_reader :cardholder_prompt_data + sig { returns(T.nilable(String)) } + attr_reader :purchase_type + sig { returns(T.nilable(ReportedBreakdown)) } + attr_reader :reported_breakdown + sig { returns(T.nilable(String)) } + attr_reader :service_type + end + class Flight < Stripe::StripeObject + class Segment < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :arrival_airport_code + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(T.nilable(String)) } + attr_reader :departure_airport_code + sig { returns(T.nilable(String)) } + attr_reader :flight_number + sig { returns(T.nilable(String)) } + attr_reader :service_class + sig { returns(T.nilable(T::Boolean)) } + attr_reader :stopover_allowed + end + sig { returns(T.nilable(Integer)) } + attr_reader :departure_at + sig { returns(T.nilable(String)) } + attr_reader :passenger_name + sig { returns(T.nilable(T::Boolean)) } + attr_reader :refundable + sig { returns(T.nilable(T::Array[Segment])) } + attr_reader :segments + sig { returns(T.nilable(String)) } + attr_reader :travel_agency + end + class Fuel < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :industry_product_code + sig { returns(T.nilable(String)) } + attr_reader :quantity_decimal + sig { returns(String) } + attr_reader :type + sig { returns(String) } + attr_reader :unit + sig { returns(String) } + attr_reader :unit_cost_decimal + end + class Lodging < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :check_in_at + sig { returns(T.nilable(Integer)) } + attr_reader :nights + end + class Receipt < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Float)) } + attr_reader :quantity + sig { returns(T.nilable(Integer)) } + attr_reader :total + sig { returns(T.nilable(Integer)) } + attr_reader :unit_cost + end + sig { returns(T.nilable(Fleet)) } + attr_reader :fleet + sig { returns(T.nilable(Flight)) } + attr_reader :flight + sig { returns(T.nilable(Fuel)) } + attr_reader :fuel + sig { returns(T.nilable(Lodging)) } + attr_reader :lodging + sig { returns(T.nilable(T::Array[Receipt])) } + attr_reader :receipt + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class Treasury < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :received_credit + sig { returns(T.nilable(String)) } + attr_reader :received_debit + end + sig { returns(Integer) } + # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + sig { returns(T.nilable(AmountDetails)) } + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) } + # The `Authorization` object that led to this transaction. + attr_reader :authorization + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + attr_reader :balance_transaction + sig { returns(T.any(String, Stripe::Issuing::Card)) } + # The card used to make this transaction. + attr_reader :card + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } + # The cardholder to whom this transaction belongs. + attr_reader :cardholder + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) } + # If you've disputed the transaction, the ID of the dispute. + attr_reader :dispute + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(Integer) } + # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + attr_reader :merchant_amount + sig { returns(String) } + # The currency with which the merchant is taking payment. + attr_reader :merchant_currency + sig { returns(MerchantData) } + # Attribute for field merchant_data + attr_reader :merchant_data + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(NetworkData)) } + # Details about the transaction, such as processing dates, set by the card network. + attr_reader :network_data + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(PurchaseDetails)) } + # Additional purchase information that is optionally provided by the merchant. + attr_reader :purchase_details + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Settlement))) } + # Attribute for field settlement + attr_reader :settlement + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + attr_reader :token + sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + attr_reader :treasury + sig { returns(String) } + # The nature of the transaction. + attr_reader :type + sig { returns(T.nilable(String)) } + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + attr_reader :wallet + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi new file mode 100644 index 000000000..caf31b9e3 --- /dev/null +++ b/rbi/stripe/resources/line_item.rbi @@ -0,0 +1,65 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A line item. + class LineItem < APIResource + class Discount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::Discount) } + attr_reader :discount + end + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + # Total discount amount applied. If no discounts were applied, defaults to 0. + attr_reader :amount_discount + sig { returns(Integer) } + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + sig { returns(Integer) } + # Total tax amount applied. If no tax was applied, defaults to 0. + attr_reader :amount_tax + sig { returns(Integer) } + # Total after discounts and taxes. + attr_reader :amount_total + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + attr_reader :description + sig { returns(T::Array[Discount]) } + # The discounts applied to the line item. + attr_reader :discounts + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Stripe::Price)) } + # The price used to generate the line item. + attr_reader :price + sig { returns(T.any(String, Stripe::Product)) } + # The ID of the product for this line item. + # + # This will always be the same as `price.product`. + attr_reader :product + sig { returns(T.nilable(Integer)) } + # The quantity of products being purchased. + attr_reader :quantity + sig { returns(T::Array[Tax]) } + # The taxes applied to the line item. + attr_reader :taxes + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/login_link.rbi b/rbi/stripe/resources/login_link.rbi new file mode 100644 index 000000000..483c36f2c --- /dev/null +++ b/rbi/stripe/resources/login_link.rbi @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. + class LoginLink < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The URL for the login link. + attr_reader :url + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi new file mode 100644 index 000000000..6dba0ab74 --- /dev/null +++ b/rbi/stripe/resources/mandate.rbi @@ -0,0 +1,164 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A Mandate is a record of the permission that your customer gives you to debit their payment method. + class Mandate < APIResource + class CustomerAcceptance < Stripe::StripeObject + class Offline < Stripe::StripeObject; end + class Online < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :ip_address + sig { returns(T.nilable(String)) } + attr_reader :user_agent + end + sig { returns(T.nilable(Integer)) } + attr_reader :accepted_at + sig { returns(Offline) } + attr_reader :offline + sig { returns(Online) } + attr_reader :online + sig { returns(String) } + attr_reader :type + end + class MultiUse < Stripe::StripeObject; end + class PaymentMethodDetails < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :default_for + sig { returns(T.nilable(String)) } + attr_reader :interval_description + sig { returns(String) } + attr_reader :payment_schedule + sig { returns(String) } + attr_reader :transaction_type + end + class AmazonPay < Stripe::StripeObject; end + class AuBecsDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :url + end + class BacsDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :network_status + sig { returns(String) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :revocation_reason + sig { returns(String) } + attr_reader :url + end + class Card < Stripe::StripeObject; end + class Cashapp < Stripe::StripeObject; end + class KakaoPay < Stripe::StripeObject; end + class KrCard < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :billing_agreement_id + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :payer_id + sig { returns(T.nilable(String)) } + attr_reader :verified_email + end + class Payto < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(String) } + attr_reader :amount_type + sig { returns(T.nilable(String)) } + attr_reader :end_date + sig { returns(String) } + attr_reader :payment_schedule + sig { returns(T.nilable(Integer)) } + attr_reader :payments_per_period + sig { returns(T.nilable(String)) } + attr_reader :purpose + sig { returns(T.nilable(String)) } + attr_reader :start_date + end + class RevolutPay < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :reference + sig { returns(String) } + attr_reader :url + end + class UsBankAccount < Stripe::StripeObject + sig { returns(String) } + attr_reader :collection_method + end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Card) } + attr_reader :card + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(KakaoPay) } + attr_reader :kakao_pay + sig { returns(KrCard) } + attr_reader :kr_card + sig { returns(Link) } + attr_reader :link + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(RevolutPay) } + attr_reader :revolut_pay + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class SingleUse < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + end + sig { returns(CustomerAcceptance) } + # Attribute for field customer_acceptance + attr_reader :customer_acceptance + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(MultiUse) } + # Attribute for field multi_use + attr_reader :multi_use + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The account (if any) that the mandate is intended for. + attr_reader :on_behalf_of + sig { returns(T.any(String, Stripe::PaymentMethod)) } + # ID of the payment method associated with this mandate. + attr_reader :payment_method + sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details + attr_reader :payment_method_details + sig { returns(SingleUse) } + # Attribute for field single_use + attr_reader :single_use + sig { returns(String) } + # The mandate status indicates whether or not you can use it to initiate a payment. + attr_reader :status + sig { returns(String) } + # The type of the mandate. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/margin.rbi b/rbi/stripe/resources/margin.rbi new file mode 100644 index 000000000..748b5f2e7 --- /dev/null +++ b/rbi/stripe/resources/margin.rbi @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who + # resell products and services and earn a discount (margin) for doing so. + class Margin < APIResource + sig { returns(T::Boolean) } + # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. + attr_reader :active + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # Name of the margin that's displayed on, for example, invoices. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Float) } + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + attr_reader :percent_off + sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/order.rbi b/rbi/stripe/resources/order.rbi new file mode 100644 index 000000000..c9c2ca4b0 --- /dev/null +++ b/rbi/stripe/resources/order.rbi @@ -0,0 +1,446 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # An Order describes a purchase being made by a customer, including the + # products & quantities being purchased, the order status, the payment information, + # and the billing/shipping details. + # + # Related guide: [Orders overview](https://stripe.com/docs/orders) + class Order < APIResource + class AutomaticTax < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(String)) } + attr_reader :status + end + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class Credit < Stripe::StripeObject + class GiftCard < Stripe::StripeObject + sig { returns(String) } + attr_reader :card + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(GiftCard)) } + attr_reader :gift_card + sig { returns(T.nilable(T::Array[String])) } + attr_reader :ineligible_line_items + sig { returns(String) } + attr_reader :type + end + class Payment < Stripe::StripeObject + class Settings < Stripe::StripeObject + class AutomaticPaymentMethods < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :custom_mandate_url + sig { returns(T.nilable(String)) } + attr_reader :interval_description + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :verification_method + end + class AfterpayClearpay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(String) } + attr_reader :setup_future_usage + end + class Alipay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Bancontact < Stripe::StripeObject + sig { returns(String) } + attr_reader :preferred_language + sig { returns(String) } + attr_reader :setup_future_usage + end + class Card < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(T::Array[String]) } + attr_reader :requested_address_types + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :funding_type + sig { returns(String) } + attr_reader :setup_future_usage + end + class Ideal < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Klarna < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + sig { returns(String) } + attr_reader :setup_future_usage + end + class Link < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :persistent_token + sig { returns(String) } + attr_reader :setup_future_usage + end + class Oxxo < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_after_days + sig { returns(String) } + attr_reader :setup_future_usage + end + class P24 < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Paypal < Stripe::StripeObject + class LineItem < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :behavior + end + sig { returns(String) } + attr_reader :category + sig { returns(String) } + attr_reader :description + sig { returns(String) } + attr_reader :name + sig { returns(Integer) } + attr_reader :quantity + sig { returns(String) } + attr_reader :sku + sig { returns(String) } + attr_reader :sold_by + sig { returns(Tax) } + attr_reader :tax + sig { returns(Integer) } + attr_reader :unit_amount + end + sig { returns(String) } + attr_reader :capture_method + sig { returns(T::Array[LineItem]) } + attr_reader :line_items + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_id + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(T::Array[String]) } + attr_reader :subsellers + end + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(String) } + attr_reader :setup_future_usage + end + class WechatPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :app_id + sig { returns(T.nilable(String)) } + attr_reader :client + sig { returns(String) } + attr_reader :setup_future_usage + end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(AfterpayClearpay) } + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + attr_reader :alipay + sig { returns(Bancontact) } + attr_reader :bancontact + sig { returns(Card) } + attr_reader :card + sig { returns(CustomerBalance) } + attr_reader :customer_balance + sig { returns(Ideal) } + attr_reader :ideal + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Link) } + attr_reader :link + sig { returns(Oxxo) } + attr_reader :oxxo + sig { returns(P24) } + attr_reader :p24 + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(WechatPay) } + attr_reader :wechat_pay + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T.nilable(Integer)) } + attr_reader :application_fee_amount + sig { returns(T.nilable(AutomaticPaymentMethods)) } + attr_reader :automatic_payment_methods + sig { returns(T.nilable(PaymentMethodOptions)) } + attr_reader :payment_method_options + sig { returns(T.nilable(T::Array[String])) } + attr_reader :payment_method_types + sig { returns(T.nilable(String)) } + attr_reader :return_url + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_suffix + sig { returns(T.nilable(TransferData)) } + attr_reader :transfer_data + end + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + attr_reader :payment_intent + sig { returns(T.nilable(Settings)) } + attr_reader :settings + sig { returns(T.nilable(String)) } + attr_reader :status + end + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } + attr_reader :shipping_rate + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class TaxDetails < Stripe::StripeObject + class TaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(T.nilable(String)) } + attr_reader :value + end + sig { returns(String) } + attr_reader :tax_exempt + sig { returns(T::Array[TaxId]) } + attr_reader :tax_ids + end + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::Discount) } + attr_reader :discount + end + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + sig { returns(Integer) } + attr_reader :amount_credit + sig { returns(Integer) } + attr_reader :amount_discount + sig { returns(T.nilable(Integer)) } + attr_reader :amount_shipping + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Breakdown) } + attr_reader :breakdown + end + sig { returns(Integer) } + # Attribute for field amount_remaining + attr_reader :amount_remaining + sig { returns(Integer) } + # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + attr_reader :amount_subtotal + sig { returns(Integer) } + # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the Order, if any. + attr_reader :application + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(T.nilable(BillingDetails)) } + # Customer billing details associated with the order. + attr_reader :billing_details + sig { returns(T.nilable(String)) } + # The client secret of this Order. Used for client-side retrieval using a publishable key. + # + # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + # + # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + attr_reader :client_secret + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T::Array[Credit]) } + # The credits applied to the Order. At most 10 credits can be applied to an Order. + attr_reader :credits + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer which this orders belongs to. + attr_reader :customer + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } + # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # A recent IP address of the purchaser used for tax reporting and tax location inference. + attr_reader :ip_address + sig { returns(Stripe::ListObject) } + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. + attr_reader :line_items + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Payment) } + # Attribute for field payment + attr_reader :payment + sig { returns(T.nilable(ShippingCost)) } + # The details of the customer cost of shipping, including the customer chosen ShippingRate. + attr_reader :shipping_cost + sig { returns(T.nilable(ShippingDetails)) } + # Customer shipping information associated with the order. + attr_reader :shipping_details + sig { returns(String) } + # The overall status of the order. + attr_reader :status + sig { returns(TaxDetails) } + # Attribute for field tax_details + attr_reader :tax_details + sig { returns(TotalDetails) } + # Attribute for field total_details + attr_reader :total_details + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_attempt_record.rbi b/rbi/stripe/resources/payment_attempt_record.rbi new file mode 100644 index 000000000..aa3705a1c --- /dev/null +++ b/rbi/stripe/resources/payment_attempt_record.rbi @@ -0,0 +1,155 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. + # Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment + # method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record + # can have guaranteed funds. + class PaymentAttemptRecord < APIResource + class AmountCanceled < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountFailed < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountGuaranteed < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountRequested < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class CustomerDetails < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :customer + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class PaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class Custom < Stripe::StripeObject + sig { returns(String) } + attr_reader :display_name + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(T.nilable(BillingDetails)) } + attr_reader :billing_details + sig { returns(T.nilable(Custom)) } + attr_reader :custom + sig { returns(T.nilable(String)) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :type + end + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + sig { returns(AmountCanceled) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_canceled + sig { returns(AmountFailed) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_failed + sig { returns(AmountGuaranteed) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_guaranteed + sig { returns(AmountRequested) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_requested + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(CustomerDetails)) } + # Customer information for this payment. + attr_reader :customer_details + sig { returns(T.nilable(String)) } + # Indicates whether the customer was present in your checkout flow during this payment. + attr_reader :customer_presence + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(PaymentMethodDetails)) } + # Information about the Payment Method debited for this payment. + attr_reader :payment_method_details + sig { returns(String) } + # ID of the Payment Record this Payment Attempt Record belongs to. + attr_reader :payment_record + sig { returns(T.nilable(String)) } + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + attr_reader :payment_reference + sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this payment. + attr_reader :shipping_details + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi new file mode 100644 index 000000000..c6cfc54d3 --- /dev/null +++ b/rbi/stripe/resources/payment_intent.rbi @@ -0,0 +1,1435 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + class PaymentIntent < APIResource + class AmountDetails < Stripe::StripeObject + class Tip < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + end + sig { returns(Tip) } + attr_reader :tip + end + class AsyncWorkflows < Stripe::StripeObject + class Inputs < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(String) } + attr_reader :calculation + end + sig { returns(Tax) } + attr_reader :tax + end + sig { returns(Inputs) } + attr_reader :inputs + end + class AutomaticPaymentMethods < Stripe::StripeObject + sig { returns(String) } + attr_reader :allow_redirects + sig { returns(T::Boolean) } + attr_reader :enabled + end + class LastPaymentError < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :decline_code + sig { returns(String) } + attr_reader :doc_url + sig { returns(String) } + attr_reader :message + sig { returns(String) } + attr_reader :param + sig { returns(Stripe::PaymentIntent) } + attr_reader :payment_intent + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :payment_method_type + sig { returns(String) } + attr_reader :request_log_url + sig { returns(Stripe::SetupIntent) } + attr_reader :setup_intent + sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } + attr_reader :source + sig { returns(String) } + attr_reader :type + end + class NextAction < Stripe::StripeObject + class AlipayHandleRedirect < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :native_data + sig { returns(T.nilable(String)) } + attr_reader :native_url + sig { returns(T.nilable(String)) } + attr_reader :return_url + sig { returns(T.nilable(String)) } + attr_reader :url + end + class BoletoDisplayDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(T.nilable(String)) } + attr_reader :hosted_voucher_url + sig { returns(T.nilable(String)) } + attr_reader :number + sig { returns(T.nilable(String)) } + attr_reader :pdf + end + class CardAwaitNotification < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :charge_attempt_at + sig { returns(T.nilable(T::Boolean)) } + attr_reader :customer_approval_required + end + class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject + class QrCode < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_at + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + sig { returns(String) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :mobile_auth_url + sig { returns(QrCode) } + attr_reader :qr_code + end + class DisplayBankTransferInstructions < Stripe::StripeObject + class FinancialAddress < Stripe::StripeObject + class Aba < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :account_type + sig { returns(BankAddress) } + attr_reader :bank_address + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :routing_number + end + class Iban < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :bic + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :iban + end + class SortCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :sort_code + end + class Spei < Stripe::StripeObject + sig { returns(String) } + attr_reader :bank_code + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :clabe + end + class Swift < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(String) } + attr_reader :account_number + sig { returns(String) } + attr_reader :account_type + sig { returns(BankAddress) } + attr_reader :bank_address + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :swift_code + end + class Zengin < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_name + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :branch_code + sig { returns(T.nilable(String)) } + attr_reader :branch_name + end + sig { returns(Aba) } + attr_reader :aba + sig { returns(Iban) } + attr_reader :iban + sig { returns(SortCode) } + attr_reader :sort_code + sig { returns(Spei) } + attr_reader :spei + sig { returns(T::Array[String]) } + attr_reader :supported_networks + sig { returns(Swift) } + attr_reader :swift + sig { returns(String) } + attr_reader :type + sig { returns(Zengin) } + attr_reader :zengin + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_remaining + sig { returns(T.nilable(String)) } + attr_reader :currency + sig { returns(T::Array[FinancialAddress]) } + attr_reader :financial_addresses + sig { returns(T.nilable(String)) } + attr_reader :hosted_instructions_url + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(String) } + attr_reader :type + end + class KonbiniDisplayDetails < Stripe::StripeObject + class Stores < Stripe::StripeObject + class Familymart < Stripe::StripeObject + sig { returns(String) } + attr_reader :confirmation_number + sig { returns(String) } + attr_reader :payment_code + end + class Lawson < Stripe::StripeObject + sig { returns(String) } + attr_reader :confirmation_number + sig { returns(String) } + attr_reader :payment_code + end + class Ministop < Stripe::StripeObject + sig { returns(String) } + attr_reader :confirmation_number + sig { returns(String) } + attr_reader :payment_code + end + class Seicomart < Stripe::StripeObject + sig { returns(String) } + attr_reader :confirmation_number + sig { returns(String) } + attr_reader :payment_code + end + sig { returns(T.nilable(Familymart)) } + attr_reader :familymart + sig { returns(T.nilable(Lawson)) } + attr_reader :lawson + sig { returns(T.nilable(Ministop)) } + attr_reader :ministop + sig { returns(T.nilable(Seicomart)) } + attr_reader :seicomart + end + sig { returns(Integer) } + attr_reader :expires_at + sig { returns(T.nilable(String)) } + attr_reader :hosted_voucher_url + sig { returns(Stores) } + attr_reader :stores + end + class MultibancoDisplayDetails < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :entity + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(T.nilable(String)) } + attr_reader :hosted_voucher_url + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class OxxoDisplayDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :expires_after + sig { returns(T.nilable(String)) } + attr_reader :hosted_voucher_url + sig { returns(T.nilable(String)) } + attr_reader :number + end + class PaynowDisplayQrCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :data + sig { returns(T.nilable(String)) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + class PixDisplayQrCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :data + sig { returns(Integer) } + attr_reader :expires_at + sig { returns(String) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + class PromptpayDisplayQrCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :data + sig { returns(String) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + class RedirectToUrl < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :return_url + sig { returns(T.nilable(String)) } + attr_reader :url + end + class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject + class QrCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :data + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + sig { returns(String) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :mobile_auth_url + sig { returns(QrCode) } + attr_reader :qr_code + end + class VerifyWithMicrodeposits < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :arrival_date + sig { returns(String) } + attr_reader :hosted_verification_url + sig { returns(T.nilable(String)) } + attr_reader :microdeposit_type + end + class WechatPayDisplayQrCode < Stripe::StripeObject + sig { returns(String) } + attr_reader :data + sig { returns(String) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :image_data_url + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + class WechatPayRedirectToAndroidApp < Stripe::StripeObject + sig { returns(String) } + attr_reader :app_id + sig { returns(String) } + attr_reader :nonce_str + sig { returns(String) } + attr_reader :package + sig { returns(String) } + attr_reader :partner_id + sig { returns(String) } + attr_reader :prepay_id + sig { returns(String) } + attr_reader :sign + sig { returns(String) } + attr_reader :timestamp + end + class WechatPayRedirectToIosApp < Stripe::StripeObject + sig { returns(String) } + attr_reader :native_url + end + sig { returns(AlipayHandleRedirect) } + attr_reader :alipay_handle_redirect + sig { returns(BoletoDisplayDetails) } + attr_reader :boleto_display_details + sig { returns(CardAwaitNotification) } + attr_reader :card_await_notification + sig { returns(CashappHandleRedirectOrDisplayQrCode) } + attr_reader :cashapp_handle_redirect_or_display_qr_code + sig { returns(DisplayBankTransferInstructions) } + attr_reader :display_bank_transfer_instructions + sig { returns(KonbiniDisplayDetails) } + attr_reader :konbini_display_details + sig { returns(MultibancoDisplayDetails) } + attr_reader :multibanco_display_details + sig { returns(OxxoDisplayDetails) } + attr_reader :oxxo_display_details + sig { returns(PaynowDisplayQrCode) } + attr_reader :paynow_display_qr_code + sig { returns(PixDisplayQrCode) } + attr_reader :pix_display_qr_code + sig { returns(PromptpayDisplayQrCode) } + attr_reader :promptpay_display_qr_code + sig { returns(RedirectToUrl) } + attr_reader :redirect_to_url + sig { returns(SwishHandleRedirectOrDisplayQrCode) } + attr_reader :swish_handle_redirect_or_display_qr_code + sig { returns(String) } + attr_reader :type + sig { returns(T::Hash[String, T.any()]) } + attr_reader :use_stripe_sdk + sig { returns(VerifyWithMicrodeposits) } + attr_reader :verify_with_microdeposits + sig { returns(WechatPayDisplayQrCode) } + attr_reader :wechat_pay_display_qr_code + sig { returns(WechatPayRedirectToAndroidApp) } + attr_reader :wechat_pay_redirect_to_android_app + sig { returns(WechatPayRedirectToIosApp) } + attr_reader :wechat_pay_redirect_to_ios_app + end + class PaymentDetails < Stripe::StripeObject + class CarRental < Stripe::StripeObject + class Affiliate < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + end + class Delivery < Stripe::StripeObject + class Recipient < Stripe::StripeObject + sig { returns(String) } + attr_reader :email + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :phone + end + sig { returns(String) } + attr_reader :mode + sig { returns(Recipient) } + attr_reader :recipient + end + class Driver < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + end + class PickupAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ReturnAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Affiliate) } + attr_reader :affiliate + sig { returns(String) } + attr_reader :booking_number + sig { returns(String) } + attr_reader :car_class_code + sig { returns(String) } + attr_reader :car_make + sig { returns(String) } + attr_reader :car_model + sig { returns(String) } + attr_reader :company + sig { returns(String) } + attr_reader :customer_service_phone_number + sig { returns(Integer) } + attr_reader :days_rented + sig { returns(Delivery) } + attr_reader :delivery + sig { returns(T::Array[Driver]) } + attr_reader :drivers + sig { returns(T::Array[String]) } + attr_reader :extra_charges + sig { returns(T::Boolean) } + attr_reader :no_show + sig { returns(PickupAddress) } + attr_reader :pickup_address + sig { returns(Integer) } + attr_reader :pickup_at + sig { returns(Integer) } + attr_reader :rate_amount + sig { returns(String) } + attr_reader :rate_interval + sig { returns(String) } + attr_reader :renter_name + sig { returns(ReturnAddress) } + attr_reader :return_address + sig { returns(Integer) } + attr_reader :return_at + sig { returns(T::Boolean) } + attr_reader :tax_exempt + end + class EventDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class Affiliate < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + end + class Delivery < Stripe::StripeObject + class Recipient < Stripe::StripeObject + sig { returns(String) } + attr_reader :email + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :phone + end + sig { returns(String) } + attr_reader :mode + sig { returns(Recipient) } + attr_reader :recipient + end + sig { returns(T::Boolean) } + attr_reader :access_controlled_venue + sig { returns(Address) } + attr_reader :address + sig { returns(Affiliate) } + attr_reader :affiliate + sig { returns(String) } + attr_reader :company + sig { returns(Delivery) } + attr_reader :delivery + sig { returns(Integer) } + attr_reader :ends_at + sig { returns(String) } + attr_reader :genre + sig { returns(String) } + attr_reader :name + sig { returns(Integer) } + attr_reader :starts_at + end + class Subscription < Stripe::StripeObject + class Affiliate < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + end + class BillingInterval < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :count + sig { returns(String) } + attr_reader :interval + end + sig { returns(Affiliate) } + attr_reader :affiliate + sig { returns(T::Boolean) } + attr_reader :auto_renewal + sig { returns(BillingInterval) } + attr_reader :billing_interval + sig { returns(Integer) } + attr_reader :ends_at + sig { returns(String) } + attr_reader :name + sig { returns(Integer) } + attr_reader :starts_at + end + sig { returns(CarRental) } + attr_reader :car_rental + sig { returns(EventDetails) } + attr_reader :event_details + sig { returns(Subscription) } + attr_reader :subscription + end + class PaymentMethodConfigurationDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(T.nilable(String)) } + attr_reader :parent + end + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :custom_mandate_url + sig { returns(T.nilable(String)) } + attr_reader :interval_description + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :verification_method + end + class Affirm < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :preferred_locale + sig { returns(String) } + attr_reader :setup_future_usage + end + class AfterpayClearpay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(String) } + attr_reader :setup_future_usage + end + class Alipay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Alma < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class AmazonPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class AuBecsDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class BacsDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Bancontact < Stripe::StripeObject + sig { returns(String) } + attr_reader :preferred_language + sig { returns(String) } + attr_reader :setup_future_usage + end + class Blik < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Boleto < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_after_days + sig { returns(String) } + attr_reader :setup_future_usage + end + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + class AvailablePlan < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :count + sig { returns(T.nilable(String)) } + attr_reader :interval + sig { returns(String) } + attr_reader :type + end + class Plan < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :count + sig { returns(T.nilable(String)) } + attr_reader :interval + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[AvailablePlan])) } + attr_reader :available_plans + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Plan)) } + attr_reader :plan + end + class MandateOptions < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :amount_type + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Integer)) } + attr_reader :end_date + sig { returns(String) } + attr_reader :interval + sig { returns(T.nilable(Integer)) } + attr_reader :interval_count + sig { returns(String) } + attr_reader :reference + sig { returns(Integer) } + attr_reader :start_date + sig { returns(T.nilable(T::Array[String])) } + attr_reader :supported_types + end + class StatementDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(String) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :line1 + sig { returns(String) } + attr_reader :line2 + sig { returns(String) } + attr_reader :postal_code + sig { returns(String) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(String) } + attr_reader :phone + end + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(Installments)) } + attr_reader :installments + sig { returns(T.nilable(MandateOptions)) } + attr_reader :mandate_options + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(String) } + attr_reader :request_decremental_authorization + sig { returns(String) } + attr_reader :request_extended_authorization + sig { returns(String) } + attr_reader :request_incremental_authorization + sig { returns(String) } + attr_reader :request_multicapture + sig { returns(String) } + attr_reader :request_overcapture + sig { returns(T.nilable(String)) } + attr_reader :request_three_d_secure + sig { returns(T::Boolean) } + attr_reader :require_cvc_recollection + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :statement_descriptor_suffix_kana + sig { returns(String) } + attr_reader :statement_descriptor_suffix_kanji + sig { returns(StatementDetails) } + attr_reader :statement_details + end + class CardPresent < Stripe::StripeObject + class Routing < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :requested_priority + end + sig { returns(T.nilable(T::Boolean)) } + attr_reader :request_extended_authorization + sig { returns(T.nilable(T::Boolean)) } + attr_reader :request_incremental_authorization_support + sig { returns(Routing) } + attr_reader :routing + end + class Cashapp < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(T::Array[String]) } + attr_reader :requested_address_types + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :funding_type + sig { returns(String) } + attr_reader :setup_future_usage + end + class Eps < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Fpx < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Giropay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Gopay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Grabpay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class IdBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :expires_after + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(String) } + attr_reader :setup_future_usage + end + class Ideal < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class InteracPresent < Stripe::StripeObject; end + class KakaoPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class Klarna < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + sig { returns(String) } + attr_reader :setup_future_usage + end + class Konbini < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :confirmation_number + sig { returns(T.nilable(Integer)) } + attr_reader :expires_after_days + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(T.nilable(String)) } + attr_reader :product_description + sig { returns(String) } + attr_reader :setup_future_usage + end + class KrCard < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class Link < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :persistent_token + sig { returns(String) } + attr_reader :setup_future_usage + end + class MbWay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Mobilepay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class Multibanco < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class NaverPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class Oxxo < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_after_days + sig { returns(String) } + attr_reader :setup_future_usage + end + class P24 < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Payco < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class Paynow < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Paypal < Stripe::StripeObject + class LineItem < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :behavior + end + sig { returns(String) } + attr_reader :category + sig { returns(String) } + attr_reader :description + sig { returns(String) } + attr_reader :name + sig { returns(Integer) } + attr_reader :quantity + sig { returns(String) } + attr_reader :sku + sig { returns(String) } + attr_reader :sold_by + sig { returns(Tax) } + attr_reader :tax + sig { returns(Integer) } + attr_reader :unit_amount + end + sig { returns(String) } + attr_reader :capture_method + sig { returns(T::Array[LineItem]) } + attr_reader :line_items + sig { returns(T.nilable(String)) } + attr_reader :preferred_locale + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_id + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(T::Array[String]) } + attr_reader :subsellers + end + class Payto < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :amount_type + sig { returns(T.nilable(String)) } + attr_reader :end_date + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(Integer)) } + attr_reader :payments_per_period + sig { returns(T.nilable(String)) } + attr_reader :purpose + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Pix < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :expires_after_seconds + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(String) } + attr_reader :setup_future_usage + end + class Promptpay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Qris < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Rechnung < Stripe::StripeObject; end + class RevolutPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + sig { returns(String) } + attr_reader :setup_future_usage + end + class SamsungPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :capture_method + end + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :setup_future_usage + end + class Shopeepay < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(String) } + attr_reader :setup_future_usage + end + class Swish < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(String) } + attr_reader :setup_future_usage + end + class Twint < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :account_subcategories + sig { returns(String) } + attr_reader :institution + end + class ManualEntry < Stripe::StripeObject + sig { returns(String) } + attr_reader :mode + end + sig { returns(Filters) } + attr_reader :filters + sig { returns(ManualEntry) } + attr_reader :manual_entry + sig { returns(T::Array[String]) } + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + attr_reader :prefetch + sig { returns(String) } + attr_reader :return_url + end + class MandateOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :collection_method + end + sig { returns(FinancialConnections) } + attr_reader :financial_connections + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :preferred_settlement_speed + sig { returns(String) } + attr_reader :setup_future_usage + sig { returns(String) } + attr_reader :verification_method + end + class WechatPay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :app_id + sig { returns(T.nilable(String)) } + attr_reader :client + sig { returns(String) } + attr_reader :setup_future_usage + end + class Zip < Stripe::StripeObject + sig { returns(String) } + attr_reader :setup_future_usage + end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(Affirm) } + attr_reader :affirm + sig { returns(AfterpayClearpay) } + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + attr_reader :alipay + sig { returns(Alma) } + attr_reader :alma + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Bancontact) } + attr_reader :bancontact + sig { returns(Blik) } + attr_reader :blik + sig { returns(Boleto) } + attr_reader :boleto + sig { returns(Card) } + attr_reader :card + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(CustomerBalance) } + attr_reader :customer_balance + sig { returns(Eps) } + attr_reader :eps + sig { returns(Fpx) } + attr_reader :fpx + sig { returns(Giropay) } + attr_reader :giropay + sig { returns(Gopay) } + attr_reader :gopay + sig { returns(Grabpay) } + attr_reader :grabpay + sig { returns(IdBankTransfer) } + attr_reader :id_bank_transfer + sig { returns(Ideal) } + attr_reader :ideal + sig { returns(InteracPresent) } + attr_reader :interac_present + sig { returns(KakaoPay) } + attr_reader :kakao_pay + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Konbini) } + attr_reader :konbini + sig { returns(KrCard) } + attr_reader :kr_card + sig { returns(Link) } + attr_reader :link + sig { returns(MbWay) } + attr_reader :mb_way + sig { returns(Mobilepay) } + attr_reader :mobilepay + sig { returns(Multibanco) } + attr_reader :multibanco + sig { returns(NaverPay) } + attr_reader :naver_pay + sig { returns(Oxxo) } + attr_reader :oxxo + sig { returns(P24) } + attr_reader :p24 + sig { returns(Payco) } + attr_reader :payco + sig { returns(Paynow) } + attr_reader :paynow + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(Pix) } + attr_reader :pix + sig { returns(Promptpay) } + attr_reader :promptpay + sig { returns(Qris) } + attr_reader :qris + sig { returns(Rechnung) } + attr_reader :rechnung + sig { returns(RevolutPay) } + attr_reader :revolut_pay + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(Shopeepay) } + attr_reader :shopeepay + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(Swish) } + attr_reader :swish + sig { returns(Twint) } + attr_reader :twint + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + sig { returns(WechatPay) } + attr_reader :wechat_pay + sig { returns(Zip) } + attr_reader :zip + end + class Processing < Stripe::StripeObject + class Card < Stripe::StripeObject + class CustomerNotification < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :approval_requested + sig { returns(T.nilable(Integer)) } + attr_reader :completes_at + end + sig { returns(CustomerNotification) } + attr_reader :customer_notification + end + sig { returns(Card) } + attr_reader :card + sig { returns(String) } + attr_reader :type + end + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class TransferData < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(Integer) } + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + sig { returns(Integer) } + # Amount that can be captured from this PaymentIntent. + attr_reader :amount_capturable + sig { returns(AmountDetails) } + # Attribute for field amount_details + attr_reader :amount_details + sig { returns(Integer) } + # Amount that this PaymentIntent collects. + attr_reader :amount_received + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the PaymentIntent. + attr_reader :application + sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_reader :application_fee_amount + sig { returns(AsyncWorkflows) } + # Attribute for field async_workflows + attr_reader :async_workflows + sig { returns(T.nilable(AutomaticPaymentMethods)) } + # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + attr_reader :automatic_payment_methods + sig { returns(T.nilable(Integer)) } + # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + sig { returns(T.nilable(String)) } + # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + attr_reader :cancellation_reason + sig { returns(String) } + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + sig { returns(T.nilable(String)) } + # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + # + # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + # + # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + attr_reader :client_secret + sig { returns(String) } + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + attr_reader :confirmation_method + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + attr_reader :customer + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice that created this PaymentIntent, if it exists. + attr_reader :invoice + sig { returns(T.nilable(LastPaymentError)) } + # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + attr_reader :last_payment_error + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + attr_reader :latest_charge + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + attr_reader :metadata + sig { returns(T.nilable(NextAction)) } + # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + attr_reader :next_action + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + attr_reader :on_behalf_of + sig { returns(PaymentDetails) } + # Attribute for field payment_details + attr_reader :payment_details + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the payment method used in this PaymentIntent. + attr_reader :payment_method + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + attr_reader :payment_method_configuration_details + sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for this PaymentIntent. + attr_reader :payment_method_options + sig { returns(T::Array[String]) } + # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + attr_reader :payment_method_types + sig { returns(T.nilable(Processing)) } + # If present, this property tells you about the processing state of the payment. + attr_reader :processing + sig { returns(T.nilable(String)) } + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_reader :receipt_email + sig { returns(T.nilable(T.any(String, Stripe::Review))) } + # ID of the review associated with this PaymentIntent, if any. + attr_reader :review + sig { returns(String) } + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + attr_reader :secret_key_confirmation + sig { returns(T.nilable(String)) } + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + sig { returns(T.nilable(Shipping)) } + # Shipping information for this PaymentIntent. + attr_reader :shipping + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } + # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + attr_reader :source + sig { returns(T.nilable(String)) } + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_reader :statement_descriptor_suffix + sig { returns(String) } + # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + attr_reader :status + sig { returns(T.nilable(TransferData)) } + # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_reader :transfer_data + sig { returns(T.nilable(String)) } + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + attr_reader :transfer_group + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_link.rbi b/rbi/stripe/resources/payment_link.rbi new file mode 100644 index 000000000..5716e8403 --- /dev/null +++ b/rbi/stripe/resources/payment_link.rbi @@ -0,0 +1,341 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + # + # When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + # + # Related guide: [Payment Links API](https://stripe.com/docs/payment-links) + class PaymentLink < APIResource + class AfterCompletion < Stripe::StripeObject + class HostedConfirmation < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :custom_message + end + class Redirect < Stripe::StripeObject + sig { returns(String) } + attr_reader :url + end + sig { returns(HostedConfirmation) } + attr_reader :hosted_confirmation + sig { returns(Redirect) } + attr_reader :redirect + sig { returns(String) } + attr_reader :type + end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + end + class ConsentCollection < Stripe::StripeObject + class PaymentMethodReuseAgreement < Stripe::StripeObject + sig { returns(String) } + attr_reader :position + end + sig { returns(T.nilable(PaymentMethodReuseAgreement)) } + attr_reader :payment_method_reuse_agreement + sig { returns(T.nilable(String)) } + attr_reader :promotions + sig { returns(T.nilable(String)) } + attr_reader :terms_of_service + end + class CustomField < Stripe::StripeObject + class Dropdown < Stripe::StripeObject + class Option < Stripe::StripeObject + sig { returns(String) } + attr_reader :label + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Array[Option]) } + attr_reader :options + end + class Label < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :custom + sig { returns(String) } + attr_reader :type + end + class Numeric < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :maximum_length + sig { returns(T.nilable(Integer)) } + attr_reader :minimum_length + end + class Text < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :maximum_length + sig { returns(T.nilable(Integer)) } + attr_reader :minimum_length + end + sig { returns(Dropdown) } + attr_reader :dropdown + sig { returns(String) } + attr_reader :key + sig { returns(Label) } + attr_reader :label + sig { returns(Numeric) } + attr_reader :numeric + sig { returns(T::Boolean) } + attr_reader :optional + sig { returns(Text) } + attr_reader :text + sig { returns(String) } + attr_reader :type + end + class CustomText < Stripe::StripeObject + class AfterSubmit < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + class ShippingAddress < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + class Submit < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + class TermsOfServiceAcceptance < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + sig { returns(T.nilable(AfterSubmit)) } + attr_reader :after_submit + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + sig { returns(T.nilable(Submit)) } + attr_reader :submit + sig { returns(T.nilable(TermsOfServiceAcceptance)) } + attr_reader :terms_of_service_acceptance + end + class InvoiceCreation < Stripe::StripeObject + class InvoiceData < Stripe::StripeObject + class CustomField < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + class RenderingOptions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :amount_tax_display + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(T.nilable(T::Array[CustomField])) } + attr_reader :custom_fields + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :footer + sig { returns(T.nilable(Issuer)) } + attr_reader :issuer + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(RenderingOptions)) } + attr_reader :rendering_options + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(InvoiceData)) } + attr_reader :invoice_data + end + class PaymentIntentData < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :capture_method + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T::Hash[String, String]) } + attr_reader :metadata + sig { returns(T.nilable(String)) } + attr_reader :setup_future_usage + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor_suffix + sig { returns(T.nilable(String)) } + attr_reader :transfer_group + end + class PhoneNumberCollection < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + end + class Restrictions < Stripe::StripeObject + class CompletedSessions < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :count + sig { returns(Integer) } + attr_reader :limit + end + sig { returns(CompletedSessions) } + attr_reader :completed_sessions + end + class ShippingAddressCollection < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :allowed_countries + end + class ShippingOption < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :shipping_amount + sig { returns(T.any(String, Stripe::ShippingRate)) } + attr_reader :shipping_rate + end + class SubscriptionData < Stripe::StripeObject + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(Issuer) } + attr_reader :issuer + end + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + sig { returns(String) } + attr_reader :missing_payment_method + end + sig { returns(EndBehavior) } + attr_reader :end_behavior + end + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(InvoiceSettings) } + attr_reader :invoice_settings + sig { returns(T::Hash[String, String]) } + attr_reader :metadata + sig { returns(T.nilable(Integer)) } + attr_reader :trial_period_days + sig { returns(T.nilable(TrialSettings)) } + attr_reader :trial_settings + end + class TaxIdCollection < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(String) } + attr_reader :required + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T::Boolean) } + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + attr_reader :active + sig { returns(AfterCompletion) } + # Attribute for field after_completion + attr_reader :after_completion + sig { returns(T::Boolean) } + # Whether user redeemable promotion codes are enabled. + attr_reader :allow_promotion_codes + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # The ID of the Connect application that created the Payment Link. + attr_reader :application + sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_reader :application_fee_amount + sig { returns(T.nilable(Float)) } + # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(String) } + # Configuration for collecting the customer's billing address. Defaults to `auto`. + attr_reader :billing_address_collection + sig { returns(T.nilable(ConsentCollection)) } + # When set, provides configuration to gather active consent from customers. + attr_reader :consent_collection + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T::Array[CustomField]) } + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_reader :custom_fields + sig { returns(CustomText) } + # Attribute for field custom_text + attr_reader :custom_text + sig { returns(String) } + # Configuration for Customer creation during checkout. + attr_reader :customer_creation + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # The custom message to be displayed to a customer when a payment link is no longer active. + attr_reader :inactive_message + sig { returns(T.nilable(InvoiceCreation)) } + # Configuration for creating invoice for payment mode payment links. + attr_reader :invoice_creation + sig { returns(Stripe::ListObject) } + # The line items representing what is being sold. + attr_reader :line_items + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + attr_reader :on_behalf_of + sig { returns(T.nilable(PaymentIntentData)) } + # Indicates the parameters to be passed to PaymentIntent creation during checkout. + attr_reader :payment_intent_data + sig { returns(String) } + # Configuration for collecting a payment method during checkout. Defaults to `always`. + attr_reader :payment_method_collection + sig { returns(T.nilable(T::Array[String])) } + # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_reader :payment_method_types + sig { returns(PhoneNumberCollection) } + # Attribute for field phone_number_collection + attr_reader :phone_number_collection + sig { returns(T.nilable(Restrictions)) } + # Settings that restrict the usage of a payment link. + attr_reader :restrictions + sig { returns(T.nilable(ShippingAddressCollection)) } + # Configuration for collecting the customer's shipping address. + attr_reader :shipping_address_collection + sig { returns(T::Array[ShippingOption]) } + # The shipping rate options applied to the session. + attr_reader :shipping_options + sig { returns(String) } + # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + attr_reader :submit_type + sig { returns(T.nilable(SubscriptionData)) } + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + attr_reader :subscription_data + sig { returns(TaxIdCollection) } + # Attribute for field tax_id_collection + attr_reader :tax_id_collection + sig { returns(T.nilable(TransferData)) } + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + attr_reader :transfer_data + sig { returns(String) } + # The public URL that can be shared with customers. + attr_reader :url + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi new file mode 100644 index 000000000..53b17c461 --- /dev/null +++ b/rbi/stripe/resources/payment_method.rbi @@ -0,0 +1,780 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + class PaymentMethod < APIResource + class AcssDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :institution_number + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :transit_number + end + class Affirm < Stripe::StripeObject; end + class AfterpayClearpay < Stripe::StripeObject; end + class Alipay < Stripe::StripeObject; end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBecsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class BacsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :sort_code + end + class Bancontact < Stripe::StripeObject; end + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class Blik < Stripe::StripeObject; end + class Boleto < Stripe::StripeObject + sig { returns(String) } + attr_reader :tax_id + end + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + attr_reader :address_postal_code_check + sig { returns(T.nilable(String)) } + attr_reader :cvc_check + end + class GeneratedFrom < Stripe::StripeObject + class PaymentMethodDetails < Stripe::StripeObject + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :stored_at + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Receipt < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :application_cryptogram + sig { returns(T.nilable(String)) } + attr_reader :application_preferred_name + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(T.nilable(String)) } + attr_reader :authorization_response_code + sig { returns(T.nilable(String)) } + attr_reader :cardholder_verification_method + sig { returns(T.nilable(String)) } + attr_reader :dedicated_file_name + sig { returns(T.nilable(String)) } + attr_reader :terminal_verification_results + sig { returns(T.nilable(String)) } + attr_reader :transaction_status_information + end + class Wallet < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_authorized + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :brand_product + sig { returns(Integer) } + attr_reader :capture_before + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :emv_auth_data + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :generated_card + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T::Boolean) } + attr_reader :incremental_authorization_supported + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :network_transaction_id + sig { returns(T.nilable(Offline)) } + attr_reader :offline + sig { returns(T::Boolean) } + attr_reader :overcapture_supported + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(T.nilable(Receipt)) } + attr_reader :receipt + sig { returns(Wallet) } + attr_reader :wallet + end + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(String)) } + attr_reader :charge + sig { returns(T.nilable(PaymentMethodDetails)) } + attr_reader :payment_method_details + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + attr_reader :setup_attempt + end + class Networks < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :available + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + class ThreeDSecureUsage < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :supported + end + class Wallet < Stripe::StripeObject + class AmexExpressCheckout < Stripe::StripeObject; end + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + class Masterpass < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(BillingAddress)) } + attr_reader :billing_address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + class SamsungPay < Stripe::StripeObject; end + class VisaCheckout < Stripe::StripeObject + class BillingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class ShippingAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(BillingAddress)) } + attr_reader :billing_address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(ShippingAddress)) } + attr_reader :shipping_address + end + sig { returns(AmexExpressCheckout) } + attr_reader :amex_express_checkout + sig { returns(ApplePay) } + attr_reader :apple_pay + sig { returns(T.nilable(String)) } + attr_reader :dynamic_last4 + sig { returns(GooglePay) } + attr_reader :google_pay + sig { returns(Link) } + attr_reader :link + sig { returns(Masterpass) } + attr_reader :masterpass + sig { returns(SamsungPay) } + attr_reader :samsung_pay + sig { returns(String) } + attr_reader :type + sig { returns(VisaCheckout) } + attr_reader :visa_checkout + end + sig { returns(String) } + attr_reader :brand + sig { returns(T.nilable(Checks)) } + attr_reader :checks + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :display_brand + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(String) } + attr_reader :funding + sig { returns(T.nilable(GeneratedFrom)) } + attr_reader :generated_from + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(String) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(ThreeDSecureUsage)) } + attr_reader :three_d_secure_usage + sig { returns(T.nilable(Wallet)) } + attr_reader :wallet + end + class CardPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :available + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + class Offline < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :stored_at + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Wallet < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :brand_product + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(Offline)) } + attr_reader :offline + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(Wallet) } + attr_reader :wallet + end + class Cashapp < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :buyer_id + sig { returns(T.nilable(String)) } + attr_reader :cashtag + end + class CustomerBalance < Stripe::StripeObject; end + class Eps < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + end + class Fpx < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(String) } + attr_reader :bank + end + class Giropay < Stripe::StripeObject; end + class Gopay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject; end + class IdBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :display_name + end + class Ideal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bic + end + class InteracPresent < Stripe::StripeObject + class Networks < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :available + sig { returns(T.nilable(String)) } + attr_reader :preferred + end + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :cardholder_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(Integer) } + attr_reader :exp_month + sig { returns(Integer) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(T::Array[String])) } + attr_reader :preferred_locales + sig { returns(T.nilable(String)) } + attr_reader :read_method + end + class KakaoPay < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + sig { returns(T.nilable(Dob)) } + attr_reader :dob + end + class Konbini < Stripe::StripeObject; end + class KrCard < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class Link < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(String) } + attr_reader :persistent_token + end + class MbWay < Stripe::StripeObject; end + class Mobilepay < Stripe::StripeObject; end + class Multibanco < Stripe::StripeObject; end + class NaverPay < Stripe::StripeObject + sig { returns(String) } + attr_reader :funding + end + class Oxxo < Stripe::StripeObject; end + class P24 < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + end + class Payco < Stripe::StripeObject; end + class Paynow < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :payer_email + sig { returns(T.nilable(String)) } + attr_reader :payer_id + sig { returns(T.nilable(String)) } + attr_reader :verified_email + end + class Payto < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :pay_id + end + class Pix < Stripe::StripeObject; end + class Promptpay < Stripe::StripeObject; end + class Qris < Stripe::StripeObject; end + class RadarOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :session + end + class Rechnung < Stripe::StripeObject + class Dob < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :day + sig { returns(Integer) } + attr_reader :month + sig { returns(Integer) } + attr_reader :year + end + sig { returns(Dob) } + attr_reader :dob + end + class RevolutPay < Stripe::StripeObject; end + class SamsungPay < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject + class GeneratedFrom < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + attr_reader :charge + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + attr_reader :setup_attempt + end + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :branch_code + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(GeneratedFrom)) } + attr_reader :generated_from + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class Shopeepay < Stripe::StripeObject; end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :country + end + class Swish < Stripe::StripeObject; end + class Twint < Stripe::StripeObject; end + class UsBankAccount < Stripe::StripeObject + class Networks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :preferred + sig { returns(T::Array[String]) } + attr_reader :supported + end + class StatusDetails < Stripe::StripeObject + class Blocked < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :network_code + sig { returns(T.nilable(String)) } + attr_reader :reason + end + sig { returns(Blocked) } + attr_reader :blocked + end + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :financial_connections_account + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(Networks)) } + attr_reader :networks + sig { returns(T.nilable(String)) } + attr_reader :routing_number + sig { returns(T.nilable(StatusDetails)) } + attr_reader :status_details + end + class WechatPay < Stripe::StripeObject; end + class Zip < Stripe::StripeObject; end + sig { returns(AcssDebit) } + # Attribute for field acss_debit + attr_reader :acss_debit + sig { returns(Affirm) } + # Attribute for field affirm + attr_reader :affirm + sig { returns(AfterpayClearpay) } + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + # Attribute for field alipay + attr_reader :alipay + sig { returns(String) } + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + attr_reader :allow_redisplay + sig { returns(Alma) } + # Attribute for field alma + attr_reader :alma + sig { returns(AmazonPay) } + # Attribute for field amazon_pay + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + # Attribute for field bacs_debit + attr_reader :bacs_debit + sig { returns(Bancontact) } + # Attribute for field bancontact + attr_reader :bancontact + sig { returns(BillingDetails) } + # Attribute for field billing_details + attr_reader :billing_details + sig { returns(Blik) } + # Attribute for field blik + attr_reader :blik + sig { returns(Boleto) } + # Attribute for field boleto + attr_reader :boleto + sig { returns(Card) } + # Attribute for field card + attr_reader :card + sig { returns(CardPresent) } + # Attribute for field card_present + attr_reader :card_present + sig { returns(Cashapp) } + # Attribute for field cashapp + attr_reader :cashapp + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + attr_reader :customer + sig { returns(CustomerBalance) } + # Attribute for field customer_balance + attr_reader :customer_balance + sig { returns(Eps) } + # Attribute for field eps + attr_reader :eps + sig { returns(Fpx) } + # Attribute for field fpx + attr_reader :fpx + sig { returns(Giropay) } + # Attribute for field giropay + attr_reader :giropay + sig { returns(Gopay) } + # Attribute for field gopay + attr_reader :gopay + sig { returns(Grabpay) } + # Attribute for field grabpay + attr_reader :grabpay + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(IdBankTransfer) } + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + sig { returns(Ideal) } + # Attribute for field ideal + attr_reader :ideal + sig { returns(InteracPresent) } + # Attribute for field interac_present + attr_reader :interac_present + sig { returns(KakaoPay) } + # Attribute for field kakao_pay + attr_reader :kakao_pay + sig { returns(Klarna) } + # Attribute for field klarna + attr_reader :klarna + sig { returns(Konbini) } + # Attribute for field konbini + attr_reader :konbini + sig { returns(KrCard) } + # Attribute for field kr_card + attr_reader :kr_card + sig { returns(Link) } + # Attribute for field link + attr_reader :link + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(MbWay) } + # Attribute for field mb_way + attr_reader :mb_way + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(Mobilepay) } + # Attribute for field mobilepay + attr_reader :mobilepay + sig { returns(Multibanco) } + # Attribute for field multibanco + attr_reader :multibanco + sig { returns(NaverPay) } + # Attribute for field naver_pay + attr_reader :naver_pay + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Oxxo) } + # Attribute for field oxxo + attr_reader :oxxo + sig { returns(P24) } + # Attribute for field p24 + attr_reader :p24 + sig { returns(Payco) } + # Attribute for field payco + attr_reader :payco + sig { returns(Paynow) } + # Attribute for field paynow + attr_reader :paynow + sig { returns(Paypal) } + # Attribute for field paypal + attr_reader :paypal + sig { returns(Payto) } + # Attribute for field payto + attr_reader :payto + sig { returns(Pix) } + # Attribute for field pix + attr_reader :pix + sig { returns(Promptpay) } + # Attribute for field promptpay + attr_reader :promptpay + sig { returns(Qris) } + # Attribute for field qris + attr_reader :qris + sig { returns(RadarOptions) } + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_reader :radar_options + sig { returns(Rechnung) } + # Attribute for field rechnung + attr_reader :rechnung + sig { returns(RevolutPay) } + # Attribute for field revolut_pay + attr_reader :revolut_pay + sig { returns(SamsungPay) } + # Attribute for field samsung_pay + attr_reader :samsung_pay + sig { returns(SepaDebit) } + # Attribute for field sepa_debit + attr_reader :sepa_debit + sig { returns(Shopeepay) } + # Attribute for field shopeepay + attr_reader :shopeepay + sig { returns(Sofort) } + # Attribute for field sofort + attr_reader :sofort + sig { returns(Swish) } + # Attribute for field swish + attr_reader :swish + sig { returns(Twint) } + # Attribute for field twint + attr_reader :twint + sig { returns(String) } + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_reader :type + sig { returns(UsBankAccount) } + # Attribute for field us_bank_account + attr_reader :us_bank_account + sig { returns(WechatPay) } + # Attribute for field wechat_pay + attr_reader :wechat_pay + sig { returns(Zip) } + # Attribute for field zip + attr_reader :zip + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_configuration.rbi b/rbi/stripe/resources/payment_method_configuration.rbi new file mode 100644 index 000000000..9adb77af6 --- /dev/null +++ b/rbi/stripe/resources/payment_method_configuration.rbi @@ -0,0 +1,827 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. + # + # There are two types of PaymentMethodConfigurations. Which is used depends on the [charge type](https://stripe.com/docs/connect/charges): + # + # **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. + # + # **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. + # + # Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. + # + # Related guides: + # - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) + # - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) + # - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) + class PaymentMethodConfiguration < APIResource + class AcssDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Affirm < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class AfterpayClearpay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Alipay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Alma < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class AmazonPay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class ApplePay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class AuBecsDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class BacsDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Bancontact < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Blik < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Boleto < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Card < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class CartesBancaires < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Cashapp < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class CustomerBalance < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Eps < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Fpx < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Giropay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class GooglePay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Gopay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Grabpay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class IdBankTransfer < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Ideal < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Jcb < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Klarna < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Konbini < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Link < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Mobilepay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Multibanco < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Oxxo < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class P24 < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Paynow < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Paypal < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Payto < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Promptpay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Qris < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class RevolutPay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class SepaDebit < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Shopeepay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Sofort < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Swish < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Twint < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class UsBankAccount < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class WechatPay < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + class Zip < Stripe::StripeObject + class DisplayPreference < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :overridable + sig { returns(String) } + attr_reader :preference + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Boolean) } + attr_reader :available + sig { returns(DisplayPreference) } + attr_reader :display_preference + end + sig { returns(AcssDebit) } + # Attribute for field acss_debit + attr_reader :acss_debit + sig { returns(T::Boolean) } + # Whether the configuration can be used for new payments. + attr_reader :active + sig { returns(Affirm) } + # Attribute for field affirm + attr_reader :affirm + sig { returns(AfterpayClearpay) } + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + # Attribute for field alipay + attr_reader :alipay + sig { returns(Alma) } + # Attribute for field alma + attr_reader :alma + sig { returns(AmazonPay) } + # Attribute for field amazon_pay + attr_reader :amazon_pay + sig { returns(ApplePay) } + # Attribute for field apple_pay + attr_reader :apple_pay + sig { returns(T.nilable(String)) } + # For child configs, the Connect application associated with the configuration. + attr_reader :application + sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + # Attribute for field bacs_debit + attr_reader :bacs_debit + sig { returns(Bancontact) } + # Attribute for field bancontact + attr_reader :bancontact + sig { returns(Blik) } + # Attribute for field blik + attr_reader :blik + sig { returns(Boleto) } + # Attribute for field boleto + attr_reader :boleto + sig { returns(Card) } + # Attribute for field card + attr_reader :card + sig { returns(CartesBancaires) } + # Attribute for field cartes_bancaires + attr_reader :cartes_bancaires + sig { returns(Cashapp) } + # Attribute for field cashapp + attr_reader :cashapp + sig { returns(CustomerBalance) } + # Attribute for field customer_balance + attr_reader :customer_balance + sig { returns(Eps) } + # Attribute for field eps + attr_reader :eps + sig { returns(Fpx) } + # Attribute for field fpx + attr_reader :fpx + sig { returns(Giropay) } + # Attribute for field giropay + attr_reader :giropay + sig { returns(GooglePay) } + # Attribute for field google_pay + attr_reader :google_pay + sig { returns(Gopay) } + # Attribute for field gopay + attr_reader :gopay + sig { returns(Grabpay) } + # Attribute for field grabpay + attr_reader :grabpay + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(IdBankTransfer) } + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + sig { returns(Ideal) } + # Attribute for field ideal + attr_reader :ideal + sig { returns(T::Boolean) } + # The default configuration is used whenever a payment method configuration is not specified. + attr_reader :is_default + sig { returns(Jcb) } + # Attribute for field jcb + attr_reader :jcb + sig { returns(Klarna) } + # Attribute for field klarna + attr_reader :klarna + sig { returns(Konbini) } + # Attribute for field konbini + attr_reader :konbini + sig { returns(Link) } + # Attribute for field link + attr_reader :link + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(Mobilepay) } + # Attribute for field mobilepay + attr_reader :mobilepay + sig { returns(Multibanco) } + # Attribute for field multibanco + attr_reader :multibanco + sig { returns(String) } + # The configuration's name. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Oxxo) } + # Attribute for field oxxo + attr_reader :oxxo + sig { returns(P24) } + # Attribute for field p24 + attr_reader :p24 + sig { returns(T.nilable(String)) } + # For child configs, the configuration's parent configuration. + attr_reader :parent + sig { returns(Paynow) } + # Attribute for field paynow + attr_reader :paynow + sig { returns(Paypal) } + # Attribute for field paypal + attr_reader :paypal + sig { returns(Payto) } + # Attribute for field payto + attr_reader :payto + sig { returns(Promptpay) } + # Attribute for field promptpay + attr_reader :promptpay + sig { returns(Qris) } + # Attribute for field qris + attr_reader :qris + sig { returns(RevolutPay) } + # Attribute for field revolut_pay + attr_reader :revolut_pay + sig { returns(SepaDebit) } + # Attribute for field sepa_debit + attr_reader :sepa_debit + sig { returns(Shopeepay) } + # Attribute for field shopeepay + attr_reader :shopeepay + sig { returns(Sofort) } + # Attribute for field sofort + attr_reader :sofort + sig { returns(Swish) } + # Attribute for field swish + attr_reader :swish + sig { returns(Twint) } + # Attribute for field twint + attr_reader :twint + sig { returns(UsBankAccount) } + # Attribute for field us_bank_account + attr_reader :us_bank_account + sig { returns(WechatPay) } + # Attribute for field wechat_pay + attr_reader :wechat_pay + sig { returns(Zip) } + # Attribute for field zip + attr_reader :zip + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_domain.rbi b/rbi/stripe/resources/payment_method_domain.rbi new file mode 100644 index 000000000..faebee260 --- /dev/null +++ b/rbi/stripe/resources/payment_method_domain.rbi @@ -0,0 +1,94 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A payment method domain represents a web domain that you have registered with Stripe. + # Stripe Elements use registered payment method domains to control where certain payment methods are shown. + # + # Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + class PaymentMethodDomain < APIResource + class AmazonPay < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :error_message + end + sig { returns(String) } + attr_reader :status + sig { returns(StatusDetails) } + attr_reader :status_details + end + class ApplePay < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :error_message + end + sig { returns(String) } + attr_reader :status + sig { returns(StatusDetails) } + attr_reader :status_details + end + class GooglePay < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :error_message + end + sig { returns(String) } + attr_reader :status + sig { returns(StatusDetails) } + attr_reader :status_details + end + class Link < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :error_message + end + sig { returns(String) } + attr_reader :status + sig { returns(StatusDetails) } + attr_reader :status_details + end + class Paypal < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :error_message + end + sig { returns(String) } + attr_reader :status + sig { returns(StatusDetails) } + attr_reader :status_details + end + sig { returns(AmazonPay) } + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :amazon_pay + sig { returns(ApplePay) } + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :apple_pay + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The domain name that this payment method domain object represents. + attr_reader :domain_name + sig { returns(T::Boolean) } + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + attr_reader :enabled + sig { returns(GooglePay) } + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :google_pay + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(Link) } + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :link + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Paypal) } + # Indicates the status of a specific payment method on a payment method domain. + attr_reader :paypal + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_record.rbi b/rbi/stripe/resources/payment_record.rbi new file mode 100644 index 000000000..d69bded51 --- /dev/null +++ b/rbi/stripe/resources/payment_record.rbi @@ -0,0 +1,164 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. + # For example, you can create a Payment Record to model a payment made on a different payment processor, + # in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or + # more Payment Attempt Records, which represent individual attempts made on a payment network. + class PaymentRecord < APIResource + class AmountCanceled < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountFailed < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountGuaranteed < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountRefunded < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class AmountRequested < Stripe::StripeObject + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :value + end + class CustomerDetails < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :customer + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class PaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + class Custom < Stripe::StripeObject + sig { returns(String) } + attr_reader :display_name + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(T.nilable(BillingDetails)) } + attr_reader :billing_details + sig { returns(T.nilable(Custom)) } + attr_reader :custom + sig { returns(T.nilable(String)) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :type + end + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + end + sig { returns(AmountCanceled) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_canceled + sig { returns(AmountFailed) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_failed + sig { returns(AmountGuaranteed) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_guaranteed + sig { returns(AmountRefunded) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_refunded + sig { returns(AmountRequested) } + # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_requested + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(CustomerDetails)) } + # Customer information for this payment. + attr_reader :customer_details + sig { returns(T.nilable(String)) } + # Indicates whether the customer was present in your checkout flow during this payment. + attr_reader :customer_presence + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # ID of the latest Payment Attempt Record attached to this Payment Record. + attr_reader :latest_payment_attempt_record + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(PaymentMethodDetails)) } + # Information about the Payment Method debited for this payment. + attr_reader :payment_method_details + sig { returns(T.nilable(String)) } + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + attr_reader :payment_reference + sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this payment. + attr_reader :shipping_details + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/payout.rbi b/rbi/stripe/resources/payout.rbi new file mode 100644 index 000000000..e66c3827b --- /dev/null +++ b/rbi/stripe/resources/payout.rbi @@ -0,0 +1,99 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A `Payout` object is created when you receive funds from Stripe, or when you + # initiate a payout to either a bank account or debit card of a [connected + # Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + # and list all payouts. Payouts are made on [varying + # schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and + # industry. + # + # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + class Payout < APIResource + class TraceId < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + sig { returns(T.nilable(String)) } + attr_reader :value + end + sig { returns(Integer) } + # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } + # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + attr_reader :application_fee + sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + attr_reader :application_fee_amount + sig { returns(Integer) } + # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + attr_reader :arrival_date + sig { returns(T::Boolean) } + # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + attr_reader :automatic + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this payout on your account balance. + attr_reader :balance_transaction + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) } + # ID of the bank account or card the payout is sent to. + attr_reader :destination + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + attr_reader :failure_balance_transaction + sig { returns(T.nilable(String)) } + # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). + attr_reader :failure_code + sig { returns(T.nilable(String)) } + # Message that provides the reason for a payout failure, if available. + attr_reader :failure_message + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + attr_reader :method + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Payout))) } + # If the payout reverses another, this is the ID of the original payout. + attr_reader :original_payout + sig { returns(String) } + # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + attr_reader :reconciliation_status + sig { returns(T.nilable(T.any(String, Stripe::Payout))) } + # If the payout reverses, this is the ID of the payout that reverses this payout. + attr_reader :reversed_by + sig { returns(String) } + # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + attr_reader :source_type + sig { returns(T.nilable(String)) } + # Extra information about a payout that displays on the user's bank statement. + attr_reader :statement_descriptor + sig { returns(String) } + # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + attr_reader :status + sig { returns(T.nilable(TraceId)) } + # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + attr_reader :trace_id + sig { returns(String) } + # Can be `bank_account` or `card`. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/person.rbi b/rbi/stripe/resources/person.rbi new file mode 100644 index 000000000..4aa92d7f3 --- /dev/null +++ b/rbi/stripe/resources/person.rbi @@ -0,0 +1,294 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # This is an object representing a person associated with a Stripe account. + # + # A platform cannot access a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. + # + # See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information). + class Person < APIResource + class AdditionalTosAcceptances < Stripe::StripeObject + class Account < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :date + sig { returns(T.nilable(String)) } + attr_reader :ip + sig { returns(T.nilable(String)) } + attr_reader :user_agent + end + sig { returns(T.nilable(Account)) } + attr_reader :account + end + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class AddressKana < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :town + end + class AddressKanji < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :town + end + class Dob < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :day + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :year + end + class FutureRequirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :alternative_fields_due + sig { returns(T::Array[String]) } + attr_reader :original_fields_due + end + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[Alternative])) } + attr_reader :alternatives + sig { returns(T::Array[String]) } + attr_reader :currently_due + sig { returns(T::Array[Error]) } + attr_reader :errors + sig { returns(T::Array[String]) } + attr_reader :eventually_due + sig { returns(T::Array[String]) } + attr_reader :past_due + sig { returns(T::Array[String]) } + attr_reader :pending_verification + end + class RegisteredAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class Relationship < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :authorizer + sig { returns(T.nilable(T::Boolean)) } + attr_reader :director + sig { returns(T.nilable(T::Boolean)) } + attr_reader :executive + sig { returns(T.nilable(T::Boolean)) } + attr_reader :legal_guardian + sig { returns(T.nilable(T::Boolean)) } + attr_reader :owner + sig { returns(T.nilable(Float)) } + attr_reader :percent_ownership + sig { returns(T.nilable(T::Boolean)) } + attr_reader :representative + sig { returns(T.nilable(String)) } + attr_reader :title + end + class Requirements < Stripe::StripeObject + class Alternative < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :alternative_fields_due + sig { returns(T::Array[String]) } + attr_reader :original_fields_due + end + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :requirement + end + sig { returns(T.nilable(T::Array[Alternative])) } + attr_reader :alternatives + sig { returns(T::Array[String]) } + attr_reader :currently_due + sig { returns(T::Array[Error]) } + attr_reader :errors + sig { returns(T::Array[String]) } + attr_reader :eventually_due + sig { returns(T::Array[String]) } + attr_reader :past_due + sig { returns(T::Array[String]) } + attr_reader :pending_verification + end + class Verification < Stripe::StripeObject + class AdditionalDocument < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :back + sig { returns(T.nilable(String)) } + attr_reader :details + sig { returns(T.nilable(String)) } + attr_reader :details_code + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :front + end + class Document < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :back + sig { returns(T.nilable(String)) } + attr_reader :details + sig { returns(T.nilable(String)) } + attr_reader :details_code + sig { returns(T.nilable(T.any(String, Stripe::File))) } + attr_reader :front + end + sig { returns(T.nilable(AdditionalDocument)) } + attr_reader :additional_document + sig { returns(T.nilable(String)) } + attr_reader :details + sig { returns(T.nilable(String)) } + attr_reader :details_code + sig { returns(Document) } + attr_reader :document + sig { returns(String) } + attr_reader :status + end + sig { returns(String) } + # The account the person is associated with. + attr_reader :account + sig { returns(AdditionalTosAcceptances) } + # Attribute for field additional_tos_acceptances + attr_reader :additional_tos_acceptances + sig { returns(Address) } + # Attribute for field address + attr_reader :address + sig { returns(T.nilable(AddressKana)) } + # The Kana variation of the person's address (Japan only). + attr_reader :address_kana + sig { returns(T.nilable(AddressKanji)) } + # The Kanji variation of the person's address (Japan only). + attr_reader :address_kanji + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Dob) } + # Attribute for field dob + attr_reader :dob + sig { returns(T.nilable(String)) } + # The person's email address. + attr_reader :email + sig { returns(T.nilable(String)) } + # The person's first name. + attr_reader :first_name + sig { returns(T.nilable(String)) } + # The Kana variation of the person's first name (Japan only). + attr_reader :first_name_kana + sig { returns(T.nilable(String)) } + # The Kanji variation of the person's first name (Japan only). + attr_reader :first_name_kanji + sig { returns(T::Array[String]) } + # A list of alternate names or aliases that the person is known by. + attr_reader :full_name_aliases + sig { returns(T.nilable(FutureRequirements)) } + # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + attr_reader :future_requirements + sig { returns(T.nilable(String)) } + # The person's gender. + attr_reader :gender + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). + attr_reader :id_number_provided + sig { returns(T::Boolean) } + # Whether the person's `id_number_secondary` was provided. + attr_reader :id_number_secondary_provided + sig { returns(T.nilable(String)) } + # The person's last name. + attr_reader :last_name + sig { returns(T.nilable(String)) } + # The Kana variation of the person's last name (Japan only). + attr_reader :last_name_kana + sig { returns(T.nilable(String)) } + # The Kanji variation of the person's last name (Japan only). + attr_reader :last_name_kanji + sig { returns(T.nilable(String)) } + # The person's maiden name. + attr_reader :maiden_name + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # The country where the person is a national. + attr_reader :nationality + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The person's phone number. + attr_reader :phone + sig { returns(String) } + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_reader :political_exposure + sig { returns(RegisteredAddress) } + # Attribute for field registered_address + attr_reader :registered_address + sig { returns(Relationship) } + # Attribute for field relationship + attr_reader :relationship + sig { returns(T.nilable(Requirements)) } + # Information about the requirements for this person, including what information needs to be collected, and by when. + attr_reader :requirements + sig { returns(T::Boolean) } + # Whether the last four digits of the person's Social Security number have been provided (U.S. only). + attr_reader :ssn_last_4_provided + sig { returns(Verification) } + # Attribute for field verification + attr_reader :verification + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi new file mode 100644 index 000000000..7ae87f011 --- /dev/null +++ b/rbi/stripe/resources/plan.rbi @@ -0,0 +1,99 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + # + # Plans define the base price, currency, and billing cycle for recurring purchases of products. + # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + # + # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + class Plan < APIResource + class Tier < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :flat_amount + sig { returns(T.nilable(String)) } + attr_reader :flat_amount_decimal + sig { returns(T.nilable(Integer)) } + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + attr_reader :unit_amount_decimal + sig { returns(T.nilable(Integer)) } + attr_reader :up_to + end + class TransformUsage < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :divide_by + sig { returns(String) } + attr_reader :round + end + sig { returns(T::Boolean) } + # Whether the plan can be used for new purchases. + attr_reader :active + sig { returns(T.nilable(String)) } + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + attr_reader :aggregate_usage + sig { returns(T.nilable(Integer)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + attr_reader :amount + sig { returns(T.nilable(String)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + attr_reader :amount_decimal + sig { returns(String) } + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_reader :billing_scheme + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + attr_reader :interval + sig { returns(Integer) } + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + attr_reader :interval_count + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # The meter tracking the usage of a metered price + attr_reader :meter + sig { returns(T.nilable(String)) } + # A brief description of the plan, hidden from customers. + attr_reader :nickname + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Product))) } + # The product whose pricing this plan determines. + attr_reader :product + sig { returns(T::Array[Tier]) } + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_reader :tiers + sig { returns(T.nilable(String)) } + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + attr_reader :tiers_mode + sig { returns(T.nilable(TransformUsage)) } + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + attr_reader :transform_usage + sig { returns(T.nilable(Integer)) } + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_reader :trial_period_days + sig { returns(String) } + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_reader :usage_type + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi new file mode 100644 index 000000000..b537d9f93 --- /dev/null +++ b/rbi/stripe/resources/price.rbi @@ -0,0 +1,162 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + # + # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + class Price < APIResource + class CurrencyOptions < Stripe::StripeObject + class CustomUnitAmount < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :maximum + sig { returns(T.nilable(Integer)) } + attr_reader :minimum + sig { returns(T.nilable(Integer)) } + attr_reader :preset + end + class Tier < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :flat_amount + sig { returns(T.nilable(String)) } + attr_reader :flat_amount_decimal + sig { returns(T.nilable(Integer)) } + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + attr_reader :unit_amount_decimal + sig { returns(T.nilable(Integer)) } + attr_reader :up_to + end + sig { returns(T.nilable(CustomUnitAmount)) } + attr_reader :custom_unit_amount + sig { returns(T.nilable(String)) } + attr_reader :tax_behavior + sig { returns(T::Array[Tier]) } + attr_reader :tiers + sig { returns(T.nilable(Integer)) } + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + attr_reader :unit_amount_decimal + end + class CustomUnitAmount < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :maximum + sig { returns(T.nilable(Integer)) } + attr_reader :minimum + sig { returns(T.nilable(Integer)) } + attr_reader :preset + end + class MigrateTo < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + sig { returns(Integer) } + attr_reader :effective_after + sig { returns(String) } + attr_reader :price + end + class Recurring < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :aggregate_usage + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :interval_count + sig { returns(T.nilable(String)) } + attr_reader :meter + sig { returns(T.nilable(Integer)) } + attr_reader :trial_period_days + sig { returns(String) } + attr_reader :usage_type + end + class Tier < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :flat_amount + sig { returns(T.nilable(String)) } + attr_reader :flat_amount_decimal + sig { returns(T.nilable(Integer)) } + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + attr_reader :unit_amount_decimal + sig { returns(T.nilable(Integer)) } + attr_reader :up_to + end + class TransformQuantity < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :divide_by + sig { returns(String) } + attr_reader :round + end + sig { returns(T::Boolean) } + # Whether the price can be used for new purchases. + attr_reader :active + sig { returns(String) } + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_reader :billing_scheme + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T::Hash[String, CurrencyOptions]) } + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + sig { returns(T.nilable(CustomUnitAmount)) } + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_reader :custom_unit_amount + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + attr_reader :lookup_key + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(MigrateTo)) } + # Subscriptions using this price will be migrated to use the new referenced price. + attr_reader :migrate_to + sig { returns(T.nilable(String)) } + # A brief description of the price, hidden from customers. + attr_reader :nickname + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.any(String, Stripe::Product)) } + # The ID of the product this price is associated with. + attr_reader :product + sig { returns(T.nilable(Recurring)) } + # The recurring components of a price such as `interval` and `usage_type`. + attr_reader :recurring + sig { returns(T.nilable(String)) } + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_reader :tax_behavior + sig { returns(T::Array[Tier]) } + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_reader :tiers + sig { returns(T.nilable(String)) } + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + attr_reader :tiers_mode + sig { returns(T.nilable(TransformQuantity)) } + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + attr_reader :transform_quantity + sig { returns(String) } + # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + attr_reader :type + sig { returns(T.nilable(Integer)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount + sig { returns(T.nilable(String)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount_decimal + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi new file mode 100644 index 000000000..3e0486c2f --- /dev/null +++ b/rbi/stripe/resources/product.rbi @@ -0,0 +1,110 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Products describe the specific goods or services you offer to your customers. + # For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + # They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + # [share a Payment Link](https://stripe.com/docs/payment-links), + # [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + class Product < APIResource + class MarketingFeature < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + end + class PackageDimensions < Stripe::StripeObject + sig { returns(Float) } + attr_reader :height + sig { returns(Float) } + attr_reader :length + sig { returns(Float) } + attr_reader :weight + sig { returns(Float) } + attr_reader :width + end + class Provisioning < Stripe::StripeObject + class GiftCard < Stripe::StripeObject + class FixedAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + end + sig { returns(T.nilable(FixedAmount)) } + attr_reader :fixed_amount + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(GiftCard)) } + attr_reader :gift_card + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + # Whether the product is currently available for purchase. + attr_reader :active + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::Price))) } + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + attr_reader :default_price + sig { returns(T.nilable(String)) } + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Array[String]) } + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_reader :images + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Array[MarketingFeature]) } + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + attr_reader :marketing_features + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The product's name, meant to be displayable to the customer. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(PackageDimensions)) } + # The dimensions of this product for shipping purposes. + attr_reader :package_dimensions + sig { returns(T.nilable(Provisioning)) } + # Provisioning configuration for this product. + attr_reader :provisioning + sig { returns(T.nilable(T::Boolean)) } + # Whether this product is shipped (i.e., physical goods). + attr_reader :shippable + sig { returns(T.nilable(String)) } + # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + attr_reader :statement_descriptor + sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_reader :tax_code + sig { returns(String) } + # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + attr_reader :type + sig { returns(T.nilable(String)) } + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_reader :unit_label + sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + attr_reader :updated + sig { returns(T.nilable(String)) } + # A URL of a publicly-accessible webpage for this product. + attr_reader :url + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/product_feature.rbi b/rbi/stripe/resources/product_feature.rbi new file mode 100644 index 000000000..282d5ed47 --- /dev/null +++ b/rbi/stripe/resources/product_feature.rbi @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A product_feature represents an attachment between a feature and a product. + # When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. + class ProductFeature < APIResource + sig { returns(Stripe::Entitlements::Feature) } + # A feature represents a monetizable ability or functionality in your system. + # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + attr_reader :entitlement_feature + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/promotion_code.rbi b/rbi/stripe/resources/promotion_code.rbi new file mode 100644 index 000000000..a0ebe9f34 --- /dev/null +++ b/rbi/stripe/resources/promotion_code.rbi @@ -0,0 +1,64 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to + # create multiple codes for a single coupon. + class PromotionCode < APIResource + class Restrictions < Stripe::StripeObject + class CurrencyOptions < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :minimum_amount + end + sig { returns(T::Hash[String, CurrencyOptions]) } + attr_reader :currency_options + sig { returns(T::Boolean) } + attr_reader :first_time_transaction + sig { returns(T.nilable(Integer)) } + attr_reader :minimum_amount + sig { returns(T.nilable(String)) } + attr_reader :minimum_amount_currency + end + sig { returns(T::Boolean) } + # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + attr_reader :active + sig { returns(String) } + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + attr_reader :code + sig { returns(Stripe::Coupon) } + # A coupon contains information about a percent-off or amount-off discount you + # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + attr_reader :coupon + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer that this promotion code can be used by. + attr_reader :customer + sig { returns(T.nilable(Integer)) } + # Date at which the promotion code can no longer be redeemed. + attr_reader :expires_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(Integer)) } + # Maximum number of times this promotion code can be redeemed. + attr_reader :max_redemptions + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Restrictions) } + # Attribute for field restrictions + attr_reader :restrictions + sig { returns(Integer) } + # Number of times this promotion code has been used. + attr_reader :times_redeemed + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi new file mode 100644 index 000000000..6978605de --- /dev/null +++ b/rbi/stripe/resources/quote.rbi @@ -0,0 +1,527 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A Quote is a way to model prices that you'd like to provide to a customer. + # Once accepted, it will automatically create an invoice, subscription or subscription schedule. + class Quote < APIResource + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + sig { returns(T.nilable(String)) } + attr_reader :status + end + class Computed < Stripe::StripeObject + class LastReestimationDetails < Stripe::StripeObject + class Failed < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :failure_code + sig { returns(T.nilable(String)) } + attr_reader :message + sig { returns(String) } + attr_reader :reason + end + sig { returns(T.nilable(Failed)) } + attr_reader :failed + sig { returns(String) } + attr_reader :status + end + class Recurring < Stripe::StripeObject + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::Discount) } + attr_reader :discount + end + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + sig { returns(Integer) } + attr_reader :amount_discount + sig { returns(T.nilable(Integer)) } + attr_reader :amount_shipping + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Breakdown) } + attr_reader :breakdown + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :interval_count + sig { returns(TotalDetails) } + attr_reader :total_details + end + class Upfront < Stripe::StripeObject + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::Discount) } + attr_reader :discount + end + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + sig { returns(Integer) } + attr_reader :amount_discount + sig { returns(T.nilable(Integer)) } + attr_reader :amount_shipping + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Breakdown) } + attr_reader :breakdown + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(Stripe::ListObject) } + attr_reader :line_items + sig { returns(TotalDetails) } + attr_reader :total_details + end + sig { returns(T.nilable(LastReestimationDetails)) } + attr_reader :last_reestimation_details + sig { returns(T.nilable(Recurring)) } + attr_reader :recurring + sig { returns(T.nilable(Integer)) } + attr_reader :updated_at + sig { returns(Upfront) } + attr_reader :upfront + end + class FromQuote < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :is_revision + sig { returns(T.any(String, Stripe::Quote)) } + attr_reader :quote + end + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(Issuer) } + attr_reader :issuer + end + class StatusDetails < Stripe::StripeObject + class Canceled < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reason + sig { returns(T.nilable(Integer)) } + attr_reader :transitioned_at + end + class Stale < Stripe::StripeObject + class LastReason < Stripe::StripeObject + class LinesInvalid < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :invalid_at + sig { returns(T::Array[String]) } + attr_reader :lines + end + class SubscriptionChanged < Stripe::StripeObject + sig { returns(T.nilable(Stripe::Subscription)) } + attr_reader :previous_subscription + end + class SubscriptionScheduleChanged < Stripe::StripeObject + sig { returns(T.nilable(Stripe::SubscriptionSchedule)) } + attr_reader :previous_subscription_schedule + end + sig { returns(String) } + attr_reader :line_invalid + sig { returns(T::Array[LinesInvalid]) } + attr_reader :lines_invalid + sig { returns(T.nilable(String)) } + attr_reader :marked_stale + sig { returns(String) } + attr_reader :subscription_canceled + sig { returns(SubscriptionChanged) } + attr_reader :subscription_changed + sig { returns(String) } + attr_reader :subscription_expired + sig { returns(String) } + attr_reader :subscription_schedule_canceled + sig { returns(SubscriptionScheduleChanged) } + attr_reader :subscription_schedule_changed + sig { returns(String) } + attr_reader :subscription_schedule_released + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(T.nilable(Integer)) } + attr_reader :expires_at + sig { returns(T.nilable(LastReason)) } + attr_reader :last_reason + sig { returns(T.nilable(Integer)) } + attr_reader :last_updated_at + sig { returns(T.nilable(Integer)) } + attr_reader :transitioned_at + end + sig { returns(Canceled) } + attr_reader :canceled + sig { returns(Stale) } + attr_reader :stale + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :accepted_at + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + attr_reader :finalized_at + end + class SubscriptionData < Stripe::StripeObject + class BillOnAcceptance < Stripe::StripeObject + class BillFrom < Stripe::StripeObject + class LineStartsAt < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + end + sig { returns(T.nilable(Integer)) } + attr_reader :computed + sig { returns(T.nilable(LineStartsAt)) } + attr_reader :line_starts_at + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + class BillUntil < Stripe::StripeObject + class Duration < Stripe::StripeObject + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :interval_count + end + class LineEndsAt < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + end + sig { returns(T.nilable(Integer)) } + attr_reader :computed + sig { returns(T.nilable(Duration)) } + attr_reader :duration + sig { returns(T.nilable(LineEndsAt)) } + attr_reader :line_ends_at + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(BillFrom)) } + attr_reader :bill_from + sig { returns(T.nilable(BillUntil)) } + attr_reader :bill_until + end + class Prebilling < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :iterations + end + sig { returns(T.nilable(BillOnAcceptance)) } + attr_reader :bill_on_acceptance + sig { returns(String) } + attr_reader :billing_behavior + sig { returns(T.nilable(String)) } + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Integer)) } + attr_reader :effective_date + sig { returns(T.nilable(String)) } + attr_reader :end_behavior + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + attr_reader :from_subscription + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(Prebilling)) } + attr_reader :prebilling + sig { returns(String) } + attr_reader :proration_behavior + sig { returns(T.nilable(Integer)) } + attr_reader :trial_period_days + end + class SubscriptionDataOverride < Stripe::StripeObject + class AppliesTo < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :new_reference + sig { returns(T.nilable(String)) } + attr_reader :subscription_schedule + sig { returns(String) } + attr_reader :type + end + class BillOnAcceptance < Stripe::StripeObject + class BillFrom < Stripe::StripeObject + class LineStartsAt < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + end + sig { returns(T.nilable(Integer)) } + attr_reader :computed + sig { returns(T.nilable(LineStartsAt)) } + attr_reader :line_starts_at + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + class BillUntil < Stripe::StripeObject + class Duration < Stripe::StripeObject + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :interval_count + end + class LineEndsAt < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + end + sig { returns(T.nilable(Integer)) } + attr_reader :computed + sig { returns(T.nilable(Duration)) } + attr_reader :duration + sig { returns(T.nilable(LineEndsAt)) } + attr_reader :line_ends_at + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(BillFrom)) } + attr_reader :bill_from + sig { returns(T.nilable(BillUntil)) } + attr_reader :bill_until + end + sig { returns(AppliesTo) } + attr_reader :applies_to + sig { returns(T.nilable(BillOnAcceptance)) } + attr_reader :bill_on_acceptance + sig { returns(String) } + attr_reader :billing_behavior + sig { returns(T.nilable(String)) } + attr_reader :customer + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :end_behavior + sig { returns(T.nilable(String)) } + attr_reader :proration_behavior + end + class SubscriptionSchedule < Stripe::StripeObject + class AppliesTo < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :new_reference + sig { returns(T.nilable(String)) } + attr_reader :subscription_schedule + sig { returns(String) } + attr_reader :type + end + sig { returns(AppliesTo) } + attr_reader :applies_to + sig { returns(String) } + attr_reader :subscription_schedule + end + class TotalDetails < Stripe::StripeObject + class Breakdown < Stripe::StripeObject + class Discount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::Discount) } + attr_reader :discount + end + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + sig { returns(Integer) } + attr_reader :amount_discount + sig { returns(T.nilable(Integer)) } + attr_reader :amount_shipping + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Breakdown) } + attr_reader :breakdown + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(Float)) } + attr_reader :amount_percent + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T.nilable(T::Boolean)) } + # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + attr_reader :allow_backdated_lines + sig { returns(Integer) } + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + sig { returns(Integer) } + # Total after discounts and taxes are applied. + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the quote. + attr_reader :application + sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + attr_reader :application_fee_amount + sig { returns(T.nilable(Float)) } + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_reader :collection_method + sig { returns(Computed) } + # Attribute for field computed + attr_reader :computed + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_reader :customer + sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) } + # The tax rates applied to this quote. + attr_reader :default_tax_rates + sig { returns(T.nilable(String)) } + # A description that will be displayed on the quote PDF. + attr_reader :description + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to this quote. + attr_reader :discounts + sig { returns(Integer) } + # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + attr_reader :expires_at + sig { returns(T.nilable(String)) } + # A footer that will be displayed on the quote PDF. + attr_reader :footer + sig { returns(T.nilable(FromQuote)) } + # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + attr_reader :from_quote + sig { returns(T.nilable(String)) } + # A header that will be displayed on the quote PDF. + attr_reader :header + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The invoice that was created from this quote. + attr_reader :invoice + sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings + attr_reader :invoice_settings + sig { returns(Stripe::ListObject) } + # A list of items the customer is being quoted for. + attr_reader :line_items + sig { returns(T.nilable(T::Array[String])) } + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + attr_reader :lines + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(String)) } + # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + attr_reader :number + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + attr_reader :on_behalf_of + sig { returns(String) } + # The status of the quote. + attr_reader :status + sig { returns(T.nilable(StatusDetails)) } + # Details on when and why a quote has been marked as stale or canceled. + attr_reader :status_details + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that was created or updated from this quote. + attr_reader :subscription + sig { returns(SubscriptionData) } + # Attribute for field subscription_data + attr_reader :subscription_data + sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) } + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + attr_reader :subscription_data_overrides + sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } + # The subscription schedule that was created or updated from this quote. + attr_reader :subscription_schedule + sig { returns(T.nilable(T::Array[SubscriptionSchedule])) } + # The subscription schedules that were created or updated from this quote. + attr_reader :subscription_schedules + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this quote belongs to. + attr_reader :test_clock + sig { returns(TotalDetails) } + # Attribute for field total_details + attr_reader :total_details + sig { returns(T.nilable(TransferData)) } + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + attr_reader :transfer_data + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_invoice.rbi b/rbi/stripe/resources/quote_preview_invoice.rbi new file mode 100644 index 000000000..24e17f4a2 --- /dev/null +++ b/rbi/stripe/resources/quote_preview_invoice.rbi @@ -0,0 +1,663 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Invoices are statements of amounts owed by a customer, and are either + # generated one-off, or generated periodically from a subscription. + # + # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments + # that may be caused by subscription upgrades/downgrades (if necessary). + # + # If your invoice is configured to be billed through automatic charges, + # Stripe automatically finalizes your invoice and attempts payment. Note + # that finalizing the invoice, + # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does + # not happen immediately as the invoice is created. Stripe waits + # until one hour after the last webhook was successfully sent (or the last + # webhook timed out after failing). If you (and the platforms you may have + # connected to) have no webhooks configured, Stripe waits one hour after + # creation to finalize the invoice. + # + # If your invoice is configured to be billed by sending an email, then based on your + # [email settings](https://dashboard.stripe.com/account/billing/automatic), + # Stripe will email the invoice to your customer and await payment. These + # emails can contain a link to a hosted page to pay the invoice. + # + # Stripe applies any customer credit on the account before determining the + # amount due for the invoice (i.e., the amount that will be actually + # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge + # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the + # invoice is automatically marked paid, and we add the amount due to the + # customer's credit balance which is applied to the next invoice. + # + # More details on the customer's credit balance are + # [here](https://stripe.com/docs/billing/customer/balance). + # + # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) + class QuotePreviewInvoice < APIResource + class AmountsDue < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Integer) } + attr_reader :amount_paid + sig { returns(Integer) } + attr_reader :amount_remaining + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Integer)) } + attr_reader :due_date + sig { returns(T.nilable(Integer)) } + attr_reader :paid_at + sig { returns(String) } + attr_reader :status + end + class AppliesTo < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :new_reference + sig { returns(T.nilable(String)) } + attr_reader :subscription_schedule + sig { returns(String) } + attr_reader :type + end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + sig { returns(T.nilable(String)) } + attr_reader :status + end + class CustomField < Stripe::StripeObject + sig { returns(String) } + attr_reader :name + sig { returns(String) } + attr_reader :value + end + class CustomerAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class CustomerShipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class CustomerTaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(T.nilable(String)) } + attr_reader :value + end + class FromInvoice < Stripe::StripeObject + sig { returns(String) } + attr_reader :action + sig { returns(T.any(String, Stripe::Invoice)) } + attr_reader :invoice + end + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + class LastFinalizationError < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :decline_code + sig { returns(String) } + attr_reader :doc_url + sig { returns(String) } + attr_reader :message + sig { returns(String) } + attr_reader :param + sig { returns(Stripe::PaymentIntent) } + attr_reader :payment_intent + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :payment_method_type + sig { returns(String) } + attr_reader :request_log_url + sig { returns(Stripe::SetupIntent) } + attr_reader :setup_intent + sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } + attr_reader :source + sig { returns(String) } + attr_reader :type + end + class PaymentSettings < Stripe::StripeObject + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :verification_method + end + class Bancontact < Stripe::StripeObject + sig { returns(String) } + attr_reader :preferred_language + end + class Card < Stripe::StripeObject + class Installments < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :enabled + end + sig { returns(Installments) } + attr_reader :installments + sig { returns(T.nilable(String)) } + attr_reader :request_three_d_secure + end + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :funding_type + end + class IdBankTransfer < Stripe::StripeObject; end + class Konbini < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :account_subcategories + sig { returns(String) } + attr_reader :institution + end + sig { returns(Filters) } + attr_reader :filters + sig { returns(T::Array[String]) } + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + attr_reader :prefetch + end + sig { returns(FinancialConnections) } + attr_reader :financial_connections + sig { returns(String) } + attr_reader :verification_method + end + sig { returns(T.nilable(AcssDebit)) } + attr_reader :acss_debit + sig { returns(T.nilable(Bancontact)) } + attr_reader :bancontact + sig { returns(T.nilable(Card)) } + attr_reader :card + sig { returns(T.nilable(CustomerBalance)) } + attr_reader :customer_balance + sig { returns(T.nilable(IdBankTransfer)) } + attr_reader :id_bank_transfer + sig { returns(T.nilable(Konbini)) } + attr_reader :konbini + sig { returns(T.nilable(SepaDebit)) } + attr_reader :sepa_debit + sig { returns(T.nilable(UsBankAccount)) } + attr_reader :us_bank_account + end + sig { returns(T.nilable(String)) } + attr_reader :default_mandate + sig { returns(T.nilable(PaymentMethodOptions)) } + attr_reader :payment_method_options + sig { returns(T.nilable(T::Array[String])) } + attr_reader :payment_method_types + end + class Rendering < Stripe::StripeObject + class Pdf < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :page_size + end + sig { returns(T.nilable(String)) } + attr_reader :amount_tax_display + sig { returns(T.nilable(Pdf)) } + attr_reader :pdf + sig { returns(T.nilable(String)) } + attr_reader :template + sig { returns(T.nilable(Integer)) } + attr_reader :template_version + end + class ShippingCost < Stripe::StripeObject + class Tax < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(Stripe::TaxRate) } + attr_reader :rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount_subtotal + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(Integer) } + attr_reader :amount_total + sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } + attr_reader :shipping_rate + sig { returns(T::Array[Tax]) } + attr_reader :taxes + end + class ShippingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :finalized_at + sig { returns(T.nilable(Integer)) } + attr_reader :marked_uncollectible_at + sig { returns(T.nilable(Integer)) } + attr_reader :paid_at + sig { returns(T.nilable(Integer)) } + attr_reader :voided_at + end + class SubscriptionDetails < Stripe::StripeObject + class PauseCollection < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + sig { returns(T.nilable(Integer)) } + attr_reader :resumes_at + end + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(PauseCollection)) } + attr_reader :pause_collection + end + class ThresholdReason < Stripe::StripeObject + class ItemReason < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :line_item_ids + sig { returns(Integer) } + attr_reader :usage_gte + end + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T::Array[ItemReason]) } + attr_reader :item_reasons + end + class TotalDiscountAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + end + class TotalMarginAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Margin)) } + attr_reader :margin + end + class TotalPretaxCreditAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } + attr_reader :credit_balance_transaction + sig { returns(T.any(String, Stripe::Discount)) } + attr_reader :discount + sig { returns(T.any(String, Stripe::Margin)) } + attr_reader :margin + sig { returns(String) } + attr_reader :type + end + class TotalTaxAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(T::Boolean) } + attr_reader :inclusive + sig { returns(T.any(String, Stripe::TaxRate)) } + attr_reader :tax_rate + sig { returns(T.nilable(String)) } + attr_reader :taxability_reason + sig { returns(T.nilable(Integer)) } + attr_reader :taxable_amount + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T.nilable(String)) } + # The country of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_country + sig { returns(T.nilable(String)) } + # The public name of the business associated with this invoice, most often the business creating the invoice. + attr_reader :account_name + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_reader :account_tax_ids + sig { returns(Integer) } + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + attr_reader :amount_due + sig { returns(Integer) } + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. + attr_reader :amount_overpaid + sig { returns(Integer) } + # The amount, in cents (or local equivalent), that was paid. + attr_reader :amount_paid + sig { returns(Integer) } + # The difference between amount_due and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + sig { returns(Integer) } + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + sig { returns(T.nilable(T::Array[AmountsDue])) } + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + attr_reader :amounts_due + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the invoice. + attr_reader :application + sig { returns(T.nilable(Integer)) } + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + attr_reader :application_fee_amount + sig { returns(AppliesTo) } + # Attribute for field applies_to + attr_reader :applies_to + sig { returns(Integer) } + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + attr_reader :attempt_count + sig { returns(T::Boolean) } + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + attr_reader :attempted + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(T.nilable(Integer)) } + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + attr_reader :automatically_finalizes_at + sig { returns(T.nilable(String)) } + # Indicates the reason why the invoice was created. + # + # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + # * `subscription_create`: A new subscription was created. + # * `subscription_cycle`: A subscription advanced into a new period. + # * `subscription_threshold`: A subscription reached a billing threshold. + # * `subscription_update`: A subscription was updated. + # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + attr_reader :billing_reason + sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + attr_reader :collection_method + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T::Array[CustomField])) } + # Custom fields displayed on the invoice. + attr_reader :custom_fields + sig { returns(T.nilable(CustomerAddress)) } + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_address + sig { returns(T.nilable(String)) } + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_email + sig { returns(T.nilable(String)) } + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_name + sig { returns(T.nilable(String)) } + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_phone + sig { returns(T.nilable(CustomerShipping)) } + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_shipping + sig { returns(T.nilable(String)) } + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_exempt + sig { returns(T.nilable(T::Array[CustomerTaxId])) } + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + attr_reader :customer_tax_ids + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + attr_reader :default_margins + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_reader :default_source + sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates applied to this invoice, if any. + attr_reader :default_tax_rates + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_reader :description + sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + attr_reader :discount + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(T.nilable(Integer)) } + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. + attr_reader :due_date + sig { returns(T.nilable(Integer)) } + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_reader :effective_at + sig { returns(T.nilable(Integer)) } + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + attr_reader :ending_balance + sig { returns(T.nilable(String)) } + # Footer displayed on the invoice. + attr_reader :footer + sig { returns(T.nilable(FromInvoice)) } + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + attr_reader :from_invoice + sig { returns(String) } + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + attr_reader :id + sig { returns(Issuer) } + # Attribute for field issuer + attr_reader :issuer + sig { returns(T.nilable(LastFinalizationError)) } + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + attr_reader :last_finalization_error + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the most recent non-draft revision of this invoice + attr_reader :latest_revision + sig { returns(Stripe::ListObject) } + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + attr_reader :lines + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(Integer)) } + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + attr_reader :next_payment_attempt + sig { returns(T.nilable(String)) } + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + attr_reader :number + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_reader :on_behalf_of + sig { returns(T::Boolean) } + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + attr_reader :paid + sig { returns(T::Boolean) } + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + attr_reader :paid_out_of_band + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + attr_reader :payment_intent + sig { returns(PaymentSettings) } + # Attribute for field payment_settings + attr_reader :payment_settings + sig { returns(Stripe::ListObject) } + # Payments for this invoice + attr_reader :payments + sig { returns(Integer) } + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_end + sig { returns(Integer) } + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + attr_reader :period_start + sig { returns(Integer) } + # Total amount of all post-payment credit notes issued for this invoice. + attr_reader :post_payment_credit_notes_amount + sig { returns(Integer) } + # Total amount of all pre-payment credit notes issued for this invoice. + attr_reader :pre_payment_credit_notes_amount + sig { returns(T.nilable(T.any(String, Stripe::Quote))) } + # The quote this invoice was generated from. + attr_reader :quote + sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this invoice. + attr_reader :receipt_number + sig { returns(T.nilable(Rendering)) } + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_reader :rendering + sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied on the invoice. + attr_reader :shipping_cost + sig { returns(T.nilable(ShippingDetails)) } + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_reader :shipping_details + sig { returns(Integer) } + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + attr_reader :starting_balance + sig { returns(T.nilable(String)) } + # Extra information about an invoice for the customer's credit card statement. + attr_reader :statement_descriptor + sig { returns(T.nilable(String)) } + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # Attribute for field subscription + attr_reader :subscription + sig { returns(T.nilable(SubscriptionDetails)) } + # Details about the subscription that created this invoice. + attr_reader :subscription_details + sig { returns(Integer) } + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + attr_reader :subscription_proration_date + sig { returns(Integer) } + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + attr_reader :subtotal + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + attr_reader :subtotal_excluding_tax + sig { returns(T.nilable(Integer)) } + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + attr_reader :tax + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice belongs to. + attr_reader :test_clock + sig { returns(ThresholdReason) } + # Attribute for field threshold_reason + attr_reader :threshold_reason + sig { returns(Integer) } + # Total after discounts and taxes. + attr_reader :total + sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } + # The aggregate amounts calculated per discount across all line items. + attr_reader :total_discount_amounts + sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + attr_reader :total_excluding_tax + sig { returns(T.nilable(T::Array[TotalMarginAmount])) } + # The aggregate amounts calculated per margin across all line items. + attr_reader :total_margin_amounts + sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + attr_reader :total_pretax_credit_amounts + sig { returns(T::Array[TotalTaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. + attr_reader :total_tax_amounts + sig { returns(T.nilable(TransferData)) } + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + attr_reader :transfer_data + sig { returns(T.nilable(Integer)) } + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + attr_reader :webhooks_delivered_at + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi new file mode 100644 index 000000000..fe0a4f34c --- /dev/null +++ b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi @@ -0,0 +1,357 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class QuotePreviewSubscriptionSchedule < APIResource + class AppliesTo < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :new_reference + sig { returns(T.nilable(String)) } + attr_reader :subscription_schedule + sig { returns(String) } + attr_reader :type + end + class CurrentPhase < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :end_date + sig { returns(Integer) } + attr_reader :start_date + end + class DefaultSettings < Stripe::StripeObject + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + end + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T.nilable(T::Boolean)) } + attr_reader :reset_billing_cycle_anchor + end + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(Issuer) } + attr_reader :issuer + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Float)) } + attr_reader :amount_percent + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T.nilable(Float)) } + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + attr_reader :automatic_tax + sig { returns(String) } + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(BillingThresholds)) } + attr_reader :billing_thresholds + sig { returns(T.nilable(String)) } + attr_reader :collection_method + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :default_payment_method + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(InvoiceSettings) } + attr_reader :invoice_settings + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + attr_reader :on_behalf_of + sig { returns(T.nilable(TransferData)) } + attr_reader :transfer_data + end + class LastPriceMigrationError < Stripe::StripeObject + class FailedTransition < Stripe::StripeObject + sig { returns(String) } + attr_reader :source_price + sig { returns(String) } + attr_reader :target_price + end + sig { returns(Integer) } + attr_reader :errored_at + sig { returns(T::Array[FailedTransition]) } + attr_reader :failed_transitions + sig { returns(String) } + attr_reader :type + end + class Phase < Stripe::StripeObject + class AddInvoiceItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + sig { returns(T.nilable(Integer)) } + attr_reader :quantity + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :tax_rates + end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + end + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T.nilable(T::Boolean)) } + attr_reader :reset_billing_cycle_anchor + end + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(T.nilable(Issuer)) } + attr_reader :issuer + end + class Item < Stripe::StripeObject + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :usage_gte + end + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class Trial < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :converts_to + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(BillingThresholds)) } + attr_reader :billing_thresholds + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.any(String, Stripe::Plan)) } + attr_reader :plan + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + sig { returns(Integer) } + attr_reader :quantity + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :tax_rates + sig { returns(T.nilable(Trial)) } + attr_reader :trial + end + class PauseCollection < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Float)) } + attr_reader :amount_percent + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :prorate_up_front + end + sig { returns(T.nilable(EndBehavior)) } + attr_reader :end_behavior + end + sig { returns(T::Array[AddInvoiceItem]) } + attr_reader :add_invoice_items + sig { returns(T.nilable(Float)) } + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + attr_reader :automatic_tax + sig { returns(T.nilable(String)) } + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(BillingThresholds)) } + attr_reader :billing_thresholds + sig { returns(T.nilable(String)) } + attr_reader :collection_method + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(String) } + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :default_payment_method + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :default_tax_rates + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(Integer) } + attr_reader :end_date + sig { returns(T.nilable(InvoiceSettings)) } + attr_reader :invoice_settings + sig { returns(T::Array[Item]) } + attr_reader :items + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + attr_reader :on_behalf_of + sig { returns(T.nilable(PauseCollection)) } + attr_reader :pause_collection + sig { returns(String) } + attr_reader :proration_behavior + sig { returns(Integer) } + attr_reader :start_date + sig { returns(T.nilable(TransferData)) } + attr_reader :transfer_data + sig { returns(T.nilable(String)) } + attr_reader :trial_continuation + sig { returns(T.nilable(Integer)) } + attr_reader :trial_end + sig { returns(T.nilable(TrialSettings)) } + attr_reader :trial_settings + end + class Prebilling < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Invoice)) } + attr_reader :invoice + sig { returns(Integer) } + attr_reader :period_end + sig { returns(Integer) } + attr_reader :period_start + sig { returns(String) } + attr_reader :update_behavior + end + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the schedule. + attr_reader :application + sig { returns(AppliesTo) } + # Attribute for field applies_to + attr_reader :applies_to + sig { returns(String) } + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + attr_reader :completed_at + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(CurrentPhase)) } + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + attr_reader :current_phase + sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription schedule. + attr_reader :customer + sig { returns(DefaultSettings) } + # Attribute for field default_settings + attr_reader :default_settings + sig { returns(String) } + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_reader :end_behavior + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription schedule. + attr_reader :last_price_migration_error + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[Phase]) } + # Configuration for the subscription schedule's phases. + attr_reader :phases + sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. + attr_reader :prebilling + sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + attr_reader :released_at + sig { returns(T.nilable(String)) } + # ID of the subscription once managed by the subscription schedule (if it is released). + attr_reader :released_subscription + sig { returns(String) } + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # ID of the subscription managed by the subscription schedule. + attr_reader :subscription + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription schedule belongs to. + attr_reader :test_clock + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/early_fraud_warning.rbi b/rbi/stripe/resources/radar/early_fraud_warning.rbi new file mode 100644 index 000000000..e48bab989 --- /dev/null +++ b/rbi/stripe/resources/radar/early_fraud_warning.rbi @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Radar + # An early fraud warning indicates that the card issuer has notified us that a + # charge may be fraudulent. + # + # Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) + class EarlyFraudWarning < APIResource + sig { returns(T::Boolean) } + # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + attr_reader :actionable + sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge this early fraud warning is for, optionally expanded. + attr_reader :charge + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + attr_reader :fraud_type + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.any(String, Stripe::PaymentIntent)) } + # ID of the Payment Intent this early fraud warning is for, optionally expanded. + attr_reader :payment_intent + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/value_list.rbi b/rbi/stripe/resources/radar/value_list.rbi new file mode 100644 index 000000000..8eff62249 --- /dev/null +++ b/rbi/stripe/resources/radar/value_list.rbi @@ -0,0 +1,45 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Radar + # Value lists allow you to group values together which can then be referenced in rules. + # + # Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) + class ValueList < APIResource + sig { returns(String) } + # The name of the value list for use in rules. + attr_reader :alias + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The name or email address of the user who created this value list. + attr_reader :created_by + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. + attr_reader :item_type + sig { returns(Stripe::ListObject) } + # List of items contained within this value list. + attr_reader :list_items + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The name of the value list. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/value_list_item.rbi b/rbi/stripe/resources/radar/value_list_item.rbi new file mode 100644 index 000000000..9792a671b --- /dev/null +++ b/rbi/stripe/resources/radar/value_list_item.rbi @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Radar + # Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + # + # Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) + class ValueListItem < APIResource + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # The name or email address of the user who added this item to the value list. + attr_reader :created_by + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The value of the item. + attr_reader :value + sig { returns(String) } + # The identifier of the value list this item belongs to. + attr_reader :value_list + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi new file mode 100644 index 000000000..ac99db7d3 --- /dev/null +++ b/rbi/stripe/resources/refund.rbi @@ -0,0 +1,263 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Refund objects allow you to refund a previously created charge that isn't + # refunded yet. Funds are refunded to the credit or debit card that's + # initially charged. + # + # Related guide: [Refunds](https://stripe.com/docs/refunds) + class Refund < APIResource + class DestinationDetails < Stripe::StripeObject + class Affirm < Stripe::StripeObject; end + class AfterpayClearpay < Stripe::StripeObject; end + class Alipay < Stripe::StripeObject; end + class Alma < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBankTransfer < Stripe::StripeObject; end + class Blik < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :network_decline_code + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class BrBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class Card < Stripe::StripeObject + sig { returns(String) } + attr_reader :reference + sig { returns(String) } + attr_reader :reference_status + sig { returns(String) } + attr_reader :reference_type + sig { returns(String) } + attr_reader :type + end + class Cashapp < Stripe::StripeObject; end + class CustomerCashBalance < Stripe::StripeObject; end + class Eps < Stripe::StripeObject; end + class EuBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class GbBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class Giropay < Stripe::StripeObject; end + class Grabpay < Stripe::StripeObject; end + class IdBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class JpBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class Klarna < Stripe::StripeObject; end + class Multibanco < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class MxBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class P24 < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class Paynow < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject; end + class Pix < Stripe::StripeObject; end + class Revolut < Stripe::StripeObject; end + class Sofort < Stripe::StripeObject; end + class Swish < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :network_decline_code + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class ThBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class UsBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :reference_status + end + class WechatPay < Stripe::StripeObject; end + class Zip < Stripe::StripeObject; end + sig { returns(Affirm) } + attr_reader :affirm + sig { returns(AfterpayClearpay) } + attr_reader :afterpay_clearpay + sig { returns(Alipay) } + attr_reader :alipay + sig { returns(Alma) } + attr_reader :alma + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBankTransfer) } + attr_reader :au_bank_transfer + sig { returns(Blik) } + attr_reader :blik + sig { returns(BrBankTransfer) } + attr_reader :br_bank_transfer + sig { returns(Card) } + attr_reader :card + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(CustomerCashBalance) } + attr_reader :customer_cash_balance + sig { returns(Eps) } + attr_reader :eps + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(GbBankTransfer) } + attr_reader :gb_bank_transfer + sig { returns(Giropay) } + attr_reader :giropay + sig { returns(Grabpay) } + attr_reader :grabpay + sig { returns(IdBankTransfer) } + attr_reader :id_bank_transfer + sig { returns(JpBankTransfer) } + attr_reader :jp_bank_transfer + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(Multibanco) } + attr_reader :multibanco + sig { returns(MxBankTransfer) } + attr_reader :mx_bank_transfer + sig { returns(P24) } + attr_reader :p24 + sig { returns(Paynow) } + attr_reader :paynow + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Pix) } + attr_reader :pix + sig { returns(Revolut) } + attr_reader :revolut + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(Swish) } + attr_reader :swish + sig { returns(ThBankTransfer) } + attr_reader :th_bank_transfer + sig { returns(String) } + attr_reader :type + sig { returns(UsBankTransfer) } + attr_reader :us_bank_transfer + sig { returns(WechatPay) } + attr_reader :wechat_pay + sig { returns(Zip) } + attr_reader :zip + end + class NextAction < Stripe::StripeObject + class DisplayDetails < Stripe::StripeObject + class EmailSent < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :email_sent_at + sig { returns(String) } + attr_reader :email_sent_to + end + sig { returns(EmailSent) } + attr_reader :email_sent + sig { returns(Integer) } + attr_reader :expires_at + end + sig { returns(DisplayDetails) } + attr_reader :display_details + sig { returns(String) } + attr_reader :type + end + sig { returns(Integer) } + # Amount, in cents (or local equivalent). + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. + attr_reader :balance_transaction + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the charge that's refunded. + attr_reader :charge + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + attr_reader :description + sig { returns(DestinationDetails) } + # Attribute for field destination_details + attr_reader :destination_details + sig { returns(T.any(String, Stripe::BalanceTransaction)) } + # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + attr_reader :failure_balance_transaction + sig { returns(String) } + # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. + attr_reader :failure_reason + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + attr_reader :instructions_email + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(NextAction) } + # Attribute for field next_action + attr_reader :next_action + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent that's refunded. + attr_reader :payment_intent + sig { returns(T.nilable(String)) } + # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + attr_reader :reason + sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this refund. + attr_reader :receipt_number + sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } + # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + attr_reader :source_transfer_reversal + sig { returns(T.nilable(String)) } + # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } + # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + attr_reader :transfer_reversal + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/reporting/report_run.rbi b/rbi/stripe/resources/reporting/report_run.rbi new file mode 100644 index 000000000..d0608859d --- /dev/null +++ b/rbi/stripe/resources/reporting/report_run.rbi @@ -0,0 +1,70 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Reporting + # The Report Run object represents an instance of a report type generated with + # specific run parameters. Once the object is created, Stripe begins processing the report. + # When the report has finished running, it will give you a reference to a file + # where you can retrieve your results. For an overview, see + # [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + # + # Note that certain report types can only be run based on your live-mode data (not test-mode + # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + class ReportRun < APIResource + class Parameters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :columns + sig { returns(String) } + attr_reader :connected_account + sig { returns(String) } + attr_reader :currency + sig { returns(Integer) } + attr_reader :interval_end + sig { returns(Integer) } + attr_reader :interval_start + sig { returns(String) } + attr_reader :payout + sig { returns(String) } + attr_reader :reporting_category + sig { returns(String) } + attr_reader :timezone + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # If something should go wrong during the run, a message about the failure (populated when + # `status=failed`). + attr_reader :error + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # `true` if the report is run on live mode data and `false` if it is run on test mode data. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Parameters) } + # Attribute for field parameters + attr_reader :parameters + sig { returns(String) } + # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + attr_reader :report_type + sig { returns(T.nilable(Stripe::File)) } + # The file object representing the result of the report run (populated when + # `status=succeeded`). + attr_reader :result + sig { returns(String) } + # Status of this report run. This will be `pending` when the run is initially created. + # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + attr_reader :status + sig { returns(T.nilable(Integer)) } + # Timestamp at which this run successfully finished (populated when + # `status=succeeded`). Measured in seconds since the Unix epoch. + attr_reader :succeeded_at + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/reporting/report_type.rbi b/rbi/stripe/resources/reporting/report_type.rbi new file mode 100644 index 000000000..a448928ef --- /dev/null +++ b/rbi/stripe/resources/reporting/report_type.rbi @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Reporting + # The Report Type resource corresponds to a particular type of report, such as + # the "Activity summary" or "Itemized payouts" reports. These objects are + # identified by an ID belonging to a set of enumerated values. See + # [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + # for those Report Type IDs, along with required and optional parameters. + # + # Note that certain report types can only be run based on your live-mode data (not test-mode + # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + class ReportType < APIResource + sig { returns(Integer) } + # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + attr_reader :data_available_end + sig { returns(Integer) } + # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + attr_reader :data_available_start + sig { returns(T.nilable(T::Array[String])) } + # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + attr_reader :default_columns + sig { returns(String) } + # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # Human-readable name of the Report Type + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # When this Report Type was latest updated. Measured in seconds since the Unix epoch. + attr_reader :updated + sig { returns(Integer) } + # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + attr_reader :version + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/reversal.rbi b/rbi/stripe/resources/reversal.rbi new file mode 100644 index 000000000..e6a4e1a0d --- /dev/null +++ b/rbi/stripe/resources/reversal.rbi @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + # connected account, either entirely or partially, and can also specify whether + # to refund any related application fees. Transfer reversals add to the + # platform's balance and subtract from the destination account's balance. + # + # Reversing a transfer that was made for a [destination + # charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of + # the charge. It is possible to reverse a + # [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) + # transfer only if the destination account has enough balance to cover the + # reversal. + # + # Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) + class Reversal < APIResource + sig { returns(Integer) } + # Amount, in cents (or local equivalent). + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. + attr_reader :balance_transaction + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # Linked payment refund for the transfer reversal. + attr_reader :destination_payment_refund + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # ID of the refund responsible for the transfer reversal. + attr_reader :source_refund + sig { returns(T.any(String, Stripe::Transfer)) } + # ID of the transfer that was reversed. + attr_reader :transfer + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/review.rbi b/rbi/stripe/resources/review.rbi new file mode 100644 index 000000000..6f4b5562d --- /dev/null +++ b/rbi/stripe/resources/review.rbi @@ -0,0 +1,75 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Reviews can be used to supplement automated fraud detection with human expertise. + # + # Learn more about [Radar](https://stripe.com/radar) and reviewing payments + # [here](https://stripe.com/docs/radar/reviews). + class Review < APIResource + class IpAddressLocation < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(Float)) } + attr_reader :latitude + sig { returns(T.nilable(Float)) } + attr_reader :longitude + sig { returns(T.nilable(String)) } + attr_reader :region + end + class Session < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :browser + sig { returns(T.nilable(String)) } + attr_reader :device + sig { returns(T.nilable(String)) } + attr_reader :platform + sig { returns(T.nilable(String)) } + attr_reader :version + end + sig { returns(T.nilable(String)) } + # The ZIP or postal code of the card used, if applicable. + attr_reader :billing_zip + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # The charge associated with this review. + attr_reader :charge + sig { returns(T.nilable(String)) } + # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + attr_reader :closed_reason + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # The IP address where the payment originated. + attr_reader :ip_address + sig { returns(T.nilable(IpAddressLocation)) } + # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + attr_reader :ip_address_location + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # If `true`, the review needs action. + attr_reader :open + sig { returns(String) } + # The reason the review was opened. One of `rule` or `manual`. + attr_reader :opened_reason + sig { returns(T.any(String, Stripe::PaymentIntent)) } + # The PaymentIntent ID associated with this review, if one exists. + attr_reader :payment_intent + sig { returns(String) } + # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + attr_reader :reason + sig { returns(T.nilable(Session)) } + # Information related to the browsing session of the user who initiated the payment. + attr_reader :session + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi new file mode 100644 index 000000000..8a40348f6 --- /dev/null +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -0,0 +1,283 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A SetupAttempt describes one attempted confirmation of a SetupIntent, + # whether that confirmation is successful or unsuccessful. You can use + # SetupAttempts to inspect details of a specific attempt at setting up a + # payment method using a SetupIntent. + class SetupAttempt < APIResource + class PaymentMethodDetails < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject; end + class AuBecsDebit < Stripe::StripeObject; end + class BacsDebit < Stripe::StripeObject; end + class Bancontact < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_sepa_debit + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + attr_reader :generated_sepa_debit_mandate + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class Boleto < Stripe::StripeObject; end + class Card < Stripe::StripeObject + class Checks < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + attr_reader :address_postal_code_check + sig { returns(T.nilable(String)) } + attr_reader :cvc_check + end + class ThreeDSecure < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :authentication_flow + sig { returns(T.nilable(String)) } + attr_reader :electronic_commerce_indicator + sig { returns(T.nilable(String)) } + attr_reader :result + sig { returns(T.nilable(String)) } + attr_reader :result_reason + sig { returns(T.nilable(String)) } + attr_reader :transaction_id + sig { returns(T.nilable(String)) } + attr_reader :version + end + class Wallet < Stripe::StripeObject + class ApplePay < Stripe::StripeObject; end + class GooglePay < Stripe::StripeObject; end + sig { returns(ApplePay) } + attr_reader :apple_pay + sig { returns(GooglePay) } + attr_reader :google_pay + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(Checks)) } + attr_reader :checks + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(T.nilable(String)) } + attr_reader :iin + sig { returns(T.nilable(String)) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(ThreeDSecure)) } + attr_reader :three_d_secure + sig { returns(T.nilable(Wallet)) } + attr_reader :wallet + end + class CardPresent < Stripe::StripeObject + class Offline < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :stored_at + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_card + sig { returns(T.nilable(Offline)) } + attr_reader :offline + end + class Cashapp < Stripe::StripeObject; end + class IdBankTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :display_name + end + class Ideal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_sepa_debit + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + attr_reader :generated_sepa_debit_mandate + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class KakaoPay < Stripe::StripeObject; end + class Klarna < Stripe::StripeObject; end + class KrCard < Stripe::StripeObject; end + class Link < Stripe::StripeObject; end + class Paypal < Stripe::StripeObject; end + class Payto < Stripe::StripeObject; end + class RevolutPay < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :generated_sepa_debit + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + attr_reader :generated_sepa_debit_mandate + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + class UsBankAccount < Stripe::StripeObject; end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(AuBecsDebit) } + attr_reader :au_becs_debit + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Bancontact) } + attr_reader :bancontact + sig { returns(Boleto) } + attr_reader :boleto + sig { returns(Card) } + attr_reader :card + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(Cashapp) } + attr_reader :cashapp + sig { returns(IdBankTransfer) } + attr_reader :id_bank_transfer + sig { returns(Ideal) } + attr_reader :ideal + sig { returns(KakaoPay) } + attr_reader :kakao_pay + sig { returns(Klarna) } + attr_reader :klarna + sig { returns(KrCard) } + attr_reader :kr_card + sig { returns(Link) } + attr_reader :link + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(RevolutPay) } + attr_reader :revolut_pay + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(Sofort) } + attr_reader :sofort + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class SetupError < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :decline_code + sig { returns(String) } + attr_reader :doc_url + sig { returns(String) } + attr_reader :message + sig { returns(String) } + attr_reader :param + sig { returns(Stripe::PaymentIntent) } + attr_reader :payment_intent + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :payment_method_type + sig { returns(String) } + attr_reader :request_log_url + sig { returns(Stripe::SetupIntent) } + attr_reader :setup_intent + sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } + attr_reader :source + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + attr_reader :application + sig { returns(T::Boolean) } + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_reader :attach_to_self + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + attr_reader :customer + sig { returns(T.nilable(T::Array[String])) } + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_reader :flow_directions + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + attr_reader :on_behalf_of + sig { returns(T.any(String, Stripe::PaymentMethod)) } + # ID of the payment method used with this SetupAttempt. + attr_reader :payment_method + sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details + attr_reader :payment_method_details + sig { returns(T.nilable(SetupError)) } + # The error encountered during this attempt to confirm the SetupIntent, if any. + attr_reader :setup_error + sig { returns(T.any(String, Stripe::SetupIntent)) } + # ID of the SetupIntent that this attempt belongs to. + attr_reader :setup_intent + sig { returns(String) } + # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + attr_reader :status + sig { returns(String) } + # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + attr_reader :usage + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi new file mode 100644 index 000000000..d63005ea3 --- /dev/null +++ b/rbi/stripe/resources/setup_intent.rbi @@ -0,0 +1,345 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + class SetupIntent < APIResource + class AutomaticPaymentMethods < Stripe::StripeObject + sig { returns(String) } + attr_reader :allow_redirects + sig { returns(T.nilable(T::Boolean)) } + attr_reader :enabled + end + class LastSetupError < Stripe::StripeObject + sig { returns(String) } + attr_reader :charge + sig { returns(String) } + attr_reader :code + sig { returns(String) } + attr_reader :decline_code + sig { returns(String) } + attr_reader :doc_url + sig { returns(String) } + attr_reader :message + sig { returns(String) } + attr_reader :param + sig { returns(Stripe::PaymentIntent) } + attr_reader :payment_intent + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :payment_method_type + sig { returns(String) } + attr_reader :request_log_url + sig { returns(Stripe::SetupIntent) } + attr_reader :setup_intent + sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } + attr_reader :source + sig { returns(String) } + attr_reader :type + end + class NextAction < Stripe::StripeObject + class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject + class QrCode < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :expires_at + sig { returns(String) } + attr_reader :image_url_png + sig { returns(String) } + attr_reader :image_url_svg + end + sig { returns(String) } + attr_reader :hosted_instructions_url + sig { returns(String) } + attr_reader :mobile_auth_url + sig { returns(QrCode) } + attr_reader :qr_code + end + class RedirectToUrl < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :return_url + sig { returns(T.nilable(String)) } + attr_reader :url + end + class VerifyWithMicrodeposits < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :arrival_date + sig { returns(String) } + attr_reader :hosted_verification_url + sig { returns(T.nilable(String)) } + attr_reader :microdeposit_type + end + sig { returns(CashappHandleRedirectOrDisplayQrCode) } + attr_reader :cashapp_handle_redirect_or_display_qr_code + sig { returns(RedirectToUrl) } + attr_reader :redirect_to_url + sig { returns(String) } + attr_reader :type + sig { returns(T::Hash[String, T.any()]) } + attr_reader :use_stripe_sdk + sig { returns(VerifyWithMicrodeposits) } + attr_reader :verify_with_microdeposits + end + class PaymentMethodConfigurationDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(T.nilable(String)) } + attr_reader :parent + end + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :custom_mandate_url + sig { returns(T::Array[String]) } + attr_reader :default_for + sig { returns(T.nilable(String)) } + attr_reader :interval_description + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(T.nilable(String)) } + attr_reader :currency + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :verification_method + end + class AmazonPay < Stripe::StripeObject; end + class BacsDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + end + class Card < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :amount_type + sig { returns(String) } + attr_reader :currency + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(Integer)) } + attr_reader :end_date + sig { returns(String) } + attr_reader :interval + sig { returns(T.nilable(Integer)) } + attr_reader :interval_count + sig { returns(String) } + attr_reader :reference + sig { returns(Integer) } + attr_reader :start_date + sig { returns(T.nilable(T::Array[String])) } + attr_reader :supported_types + end + sig { returns(T.nilable(MandateOptions)) } + attr_reader :mandate_options + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :request_three_d_secure + end + class CardPresent < Stripe::StripeObject; end + class Link < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :persistent_token + end + class Paypal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :billing_agreement_id + sig { returns(T.nilable(String)) } + attr_reader :currency + sig { returns(T::Array[String]) } + attr_reader :subsellers + end + class Payto < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :amount_type + sig { returns(T.nilable(String)) } + attr_reader :end_date + sig { returns(T.nilable(String)) } + attr_reader :payment_schedule + sig { returns(T.nilable(Integer)) } + attr_reader :payments_per_period + sig { returns(T.nilable(String)) } + attr_reader :purpose + sig { returns(T.nilable(String)) } + attr_reader :start_date + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + end + class SepaDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject; end + sig { returns(MandateOptions) } + attr_reader :mandate_options + end + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :account_subcategories + sig { returns(String) } + attr_reader :institution + end + class ManualEntry < Stripe::StripeObject + sig { returns(String) } + attr_reader :mode + end + sig { returns(Filters) } + attr_reader :filters + sig { returns(ManualEntry) } + attr_reader :manual_entry + sig { returns(T::Array[String]) } + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + attr_reader :prefetch + sig { returns(String) } + attr_reader :return_url + end + class MandateOptions < Stripe::StripeObject + sig { returns(String) } + attr_reader :collection_method + end + sig { returns(FinancialConnections) } + attr_reader :financial_connections + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :verification_method + end + sig { returns(AcssDebit) } + attr_reader :acss_debit + sig { returns(AmazonPay) } + attr_reader :amazon_pay + sig { returns(BacsDebit) } + attr_reader :bacs_debit + sig { returns(Card) } + attr_reader :card + sig { returns(CardPresent) } + attr_reader :card_present + sig { returns(Link) } + attr_reader :link + sig { returns(Paypal) } + attr_reader :paypal + sig { returns(Payto) } + attr_reader :payto + sig { returns(SepaDebit) } + attr_reader :sepa_debit + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the SetupIntent. + attr_reader :application + sig { returns(T::Boolean) } + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_reader :attach_to_self + sig { returns(T.nilable(AutomaticPaymentMethods)) } + # Settings for dynamic payment methods compatible with this Setup Intent + attr_reader :automatic_payment_methods + sig { returns(T.nilable(String)) } + # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. + attr_reader :cancellation_reason + sig { returns(T.nilable(String)) } + # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + # + # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + attr_reader :client_secret + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + attr_reader :customer + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(T::Array[String])) } + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_reader :flow_directions + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(LastSetupError)) } + # The error encountered in the previous SetupIntent confirmation. + attr_reader :last_setup_error + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + # The most recent SetupAttempt for this SetupIntent. + attr_reader :latest_attempt + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + # ID of the multi use Mandate generated by the SetupIntent. + attr_reader :mandate + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(NextAction)) } + # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + attr_reader :next_action + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the setup is intended. + attr_reader :on_behalf_of + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + attr_reader :payment_method + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + attr_reader :payment_method_configuration_details + sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment method-specific configuration for this SetupIntent. + attr_reader :payment_method_options + sig { returns(T::Array[String]) } + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + attr_reader :payment_method_types + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + # ID of the single_use Mandate generated by the SetupIntent. + attr_reader :single_use_mandate + sig { returns(String) } + # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. + attr_reader :status + sig { returns(String) } + # Indicates how the payment method is intended to be used in the future. + # + # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + attr_reader :usage + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/shipping_rate.rbi b/rbi/stripe/resources/shipping_rate.rbi new file mode 100644 index 000000000..02196c6f7 --- /dev/null +++ b/rbi/stripe/resources/shipping_rate.rbi @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Shipping rates describe the price of shipping presented to your customers and + # applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). + class ShippingRate < APIResource + class DeliveryEstimate < Stripe::StripeObject + class Maximum < Stripe::StripeObject + sig { returns(String) } + attr_reader :unit + sig { returns(Integer) } + attr_reader :value + end + class Minimum < Stripe::StripeObject + sig { returns(String) } + attr_reader :unit + sig { returns(Integer) } + attr_reader :value + end + sig { returns(T.nilable(Maximum)) } + attr_reader :maximum + sig { returns(T.nilable(Minimum)) } + attr_reader :minimum + end + class FixedAmount < Stripe::StripeObject + class CurrencyOptions < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :tax_behavior + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(T::Hash[String, CurrencyOptions]) } + attr_reader :currency_options + end + sig { returns(T::Boolean) } + # Whether the shipping rate can be used for new purchases. Defaults to `true`. + attr_reader :active + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(DeliveryEstimate)) } + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_reader :delivery_estimate + sig { returns(T.nilable(String)) } + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_reader :display_name + sig { returns(FixedAmount) } + # Attribute for field fixed_amount + attr_reader :fixed_amount + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_reader :tax_behavior + sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_reader :tax_code + sig { returns(String) } + # The type of calculation to use on the shipping rate. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/sigma/scheduled_query_run.rbi b/rbi/stripe/resources/sigma/scheduled_query_run.rbi new file mode 100644 index 000000000..7ac7fb5ce --- /dev/null +++ b/rbi/stripe/resources/sigma/scheduled_query_run.rbi @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Sigma + # If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + # receive a `sigma.scheduled_query_run.created` webhook each time the query + # runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + # retrieve the query results. + class ScheduledQueryRun < APIResource + class Error < Stripe::StripeObject + sig { returns(String) } + attr_reader :message + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Integer) } + # When the query was run, Sigma contained a snapshot of your Stripe data at this time. + attr_reader :data_load_time + sig { returns(Error) } + # Attribute for field error + attr_reader :error + sig { returns(T.nilable(Stripe::File)) } + # The file object representing the results of the query. + attr_reader :file + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # Time at which the result expires and is no longer available for download. + attr_reader :result_available_until + sig { returns(String) } + # SQL for the query. + attr_reader :sql + sig { returns(String) } + # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + attr_reader :status + sig { returns(String) } + # Title of the query. + attr_reader :title + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/source.rbi b/rbi/stripe/resources/source.rbi new file mode 100644 index 000000000..444707599 --- /dev/null +++ b/rbi/stripe/resources/source.rbi @@ -0,0 +1,668 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # `Source` objects allow you to accept a variety of payment methods. They + # represent a customer's payment instrument, and can be used with the Stripe API + # just like a `Card` object: once chargeable, they can be charged, or can be + # attached to customers. + # + # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + # This newer API provides access to our latest features and payment method types. + # + # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + class Source < APIResource + class AchCreditTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_name + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :refund_routing_number + sig { returns(T.nilable(String)) } + attr_reader :routing_number + sig { returns(T.nilable(String)) } + attr_reader :swift_code + end + class AchDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :routing_number + sig { returns(T.nilable(String)) } + attr_reader :type + end + class AcssDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_address_city + sig { returns(T.nilable(String)) } + attr_reader :bank_address_line_1 + sig { returns(T.nilable(String)) } + attr_reader :bank_address_line_2 + sig { returns(T.nilable(String)) } + attr_reader :bank_address_postal_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :category + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + class Alipay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :data_string + sig { returns(T.nilable(String)) } + attr_reader :native_url + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class AuBecsDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bsb_number + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + class Bancontact < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class Card < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + attr_reader :address_zip_check + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :cvc_check + sig { returns(String) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :dynamic_last4 + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + sig { returns(String) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(String) } + attr_reader :iin + sig { returns(String) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(String) } + attr_reader :three_d_secure + sig { returns(T.nilable(String)) } + attr_reader :tokenization_method + end + class CardPresent < Stripe::StripeObject + sig { returns(String) } + attr_reader :application_cryptogram + sig { returns(String) } + attr_reader :application_preferred_name + sig { returns(T.nilable(String)) } + attr_reader :authorization_code + sig { returns(String) } + attr_reader :authorization_response_code + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(String) } + attr_reader :cvm_type + sig { returns(T.nilable(String)) } + attr_reader :data_type + sig { returns(String) } + attr_reader :dedicated_file_name + sig { returns(String) } + attr_reader :description + sig { returns(String) } + attr_reader :emv_auth_data + sig { returns(T.nilable(String)) } + attr_reader :evidence_customer_signature + sig { returns(T.nilable(String)) } + attr_reader :evidence_transaction_certificate + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + sig { returns(String) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(String) } + attr_reader :iin + sig { returns(String) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :pos_device_id + sig { returns(String) } + attr_reader :pos_entry_mode + sig { returns(T.nilable(String)) } + attr_reader :read_method + sig { returns(T.nilable(String)) } + attr_reader :reader + sig { returns(String) } + attr_reader :terminal_verification_results + sig { returns(String) } + attr_reader :transaction_status_information + end + class CodeVerification < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :attempts_remaining + sig { returns(String) } + attr_reader :status + end + class Eps < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class Giropay < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class Ideal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class Klarna < Stripe::StripeObject + sig { returns(String) } + attr_reader :background_image_url + sig { returns(T.nilable(String)) } + attr_reader :client_token + sig { returns(String) } + attr_reader :first_name + sig { returns(String) } + attr_reader :last_name + sig { returns(String) } + attr_reader :locale + sig { returns(String) } + attr_reader :logo_url + sig { returns(String) } + attr_reader :page_title + sig { returns(String) } + attr_reader :pay_later_asset_urls_descriptive + sig { returns(String) } + attr_reader :pay_later_asset_urls_standard + sig { returns(String) } + attr_reader :pay_later_name + sig { returns(String) } + attr_reader :pay_later_redirect_url + sig { returns(String) } + attr_reader :pay_now_asset_urls_descriptive + sig { returns(String) } + attr_reader :pay_now_asset_urls_standard + sig { returns(String) } + attr_reader :pay_now_name + sig { returns(String) } + attr_reader :pay_now_redirect_url + sig { returns(String) } + attr_reader :pay_over_time_asset_urls_descriptive + sig { returns(String) } + attr_reader :pay_over_time_asset_urls_standard + sig { returns(String) } + attr_reader :pay_over_time_name + sig { returns(String) } + attr_reader :pay_over_time_redirect_url + sig { returns(String) } + attr_reader :payment_method_categories + sig { returns(String) } + attr_reader :purchase_country + sig { returns(String) } + attr_reader :purchase_type + sig { returns(String) } + attr_reader :redirect_url + sig { returns(Integer) } + attr_reader :shipping_delay + sig { returns(String) } + attr_reader :shipping_first_name + sig { returns(String) } + attr_reader :shipping_last_name + end + class Multibanco < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :entity + sig { returns(T.nilable(String)) } + attr_reader :reference + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_city + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_country + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_line1 + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_line2 + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_postal_code + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_state + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_name + sig { returns(T.nilable(String)) } + attr_reader :refund_iban + end + class Owner < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class VerifiedAddress < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(VerifiedAddress)) } + attr_reader :verified_address + sig { returns(T.nilable(String)) } + attr_reader :verified_email + sig { returns(T.nilable(String)) } + attr_reader :verified_name + sig { returns(T.nilable(String)) } + attr_reader :verified_phone + end + class P24 < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :reference + end + class Paypal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :billing_agreement + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :payer_id + sig { returns(String) } + attr_reader :reference_id + sig { returns(String) } + attr_reader :reference_transaction_amount + sig { returns(T::Boolean) } + attr_reader :reference_transaction_charged + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + sig { returns(String) } + attr_reader :transaction_id + sig { returns(T.nilable(String)) } + attr_reader :verified_email + end + class Receiver < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address + sig { returns(Integer) } + attr_reader :amount_charged + sig { returns(Integer) } + attr_reader :amount_received + sig { returns(Integer) } + attr_reader :amount_returned + sig { returns(String) } + attr_reader :refund_attributes_method + sig { returns(String) } + attr_reader :refund_attributes_status + end + class Redirect < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :failure_reason + sig { returns(String) } + attr_reader :return_url + sig { returns(String) } + attr_reader :status + sig { returns(String) } + attr_reader :url + end + class SepaCreditTransfer < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :iban + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_city + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_country + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_line1 + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_line2 + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_postal_code + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_address_state + sig { returns(T.nilable(String)) } + attr_reader :refund_account_holder_name + sig { returns(T.nilable(String)) } + attr_reader :refund_iban + end + class SepaDebit < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :branch_code + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :mandate_reference + sig { returns(T.nilable(String)) } + attr_reader :mandate_url + end + class Sofort < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_code + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :bic + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :iban_last4 + sig { returns(T.nilable(String)) } + attr_reader :preferred_language + sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + end + class SourceOrder < Stripe::StripeObject + class Item < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :currency + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :parent + sig { returns(Integer) } + attr_reader :quantity + sig { returns(T.nilable(String)) } + attr_reader :type + end + class Shipping < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :carrier + sig { returns(String) } + attr_reader :name + sig { returns(T.nilable(String)) } + attr_reader :phone + sig { returns(T.nilable(String)) } + attr_reader :tracking_number + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + sig { returns(String) } + attr_reader :email + sig { returns(T.nilable(T::Array[Item])) } + attr_reader :items + sig { returns(Shipping) } + attr_reader :shipping + end + class ThreeDSecure < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + sig { returns(T.nilable(String)) } + attr_reader :address_zip_check + sig { returns(T.nilable(T::Boolean)) } + attr_reader :authenticated + sig { returns(T.nilable(String)) } + attr_reader :brand + sig { returns(T.nilable(String)) } + attr_reader :card + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :customer + sig { returns(T.nilable(String)) } + attr_reader :cvc_check + sig { returns(String) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :dynamic_last4 + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + sig { returns(String) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :funding + sig { returns(String) } + attr_reader :iin + sig { returns(String) } + attr_reader :issuer + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :name + sig { returns(String) } + attr_reader :three_d_secure + sig { returns(T.nilable(String)) } + attr_reader :tokenization_method + end + class Wechat < Stripe::StripeObject + sig { returns(String) } + attr_reader :prepay_id + sig { returns(T.nilable(String)) } + attr_reader :qr_code_url + sig { returns(String) } + attr_reader :statement_descriptor + end + sig { returns(AchCreditTransfer) } + # Attribute for field ach_credit_transfer + attr_reader :ach_credit_transfer + sig { returns(AchDebit) } + # Attribute for field ach_debit + attr_reader :ach_debit + sig { returns(AcssDebit) } + # Attribute for field acss_debit + attr_reader :acss_debit + sig { returns(Alipay) } + # Attribute for field alipay + attr_reader :alipay + sig { returns(T.nilable(Integer)) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + attr_reader :amount + sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + sig { returns(Bancontact) } + # Attribute for field bancontact + attr_reader :bancontact + sig { returns(Card) } + # Attribute for field card + attr_reader :card + sig { returns(CardPresent) } + # Attribute for field card_present + attr_reader :card_present + sig { returns(String) } + # The client secret of the source. Used for client-side retrieval using a publishable key. + attr_reader :client_secret + sig { returns(CodeVerification) } + # Attribute for field code_verification + attr_reader :code_verification + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + attr_reader :currency + sig { returns(String) } + # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + attr_reader :customer + sig { returns(Eps) } + # Attribute for field eps + attr_reader :eps + sig { returns(String) } + # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + attr_reader :flow + sig { returns(Giropay) } + # Attribute for field giropay + attr_reader :giropay + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(Ideal) } + # Attribute for field ideal + attr_reader :ideal + sig { returns(Klarna) } + # Attribute for field klarna + attr_reader :klarna + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(Multibanco) } + # Attribute for field multibanco + attr_reader :multibanco + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Owner)) } + # Information about the owner of the payment instrument that may be used or required by particular source types. + attr_reader :owner + sig { returns(P24) } + # Attribute for field p24 + attr_reader :p24 + sig { returns(Paypal) } + # Attribute for field paypal + attr_reader :paypal + sig { returns(Receiver) } + # Attribute for field receiver + attr_reader :receiver + sig { returns(Redirect) } + # Attribute for field redirect + attr_reader :redirect + sig { returns(SepaCreditTransfer) } + # Attribute for field sepa_credit_transfer + attr_reader :sepa_credit_transfer + sig { returns(SepaDebit) } + # Attribute for field sepa_debit + attr_reader :sepa_debit + sig { returns(Sofort) } + # Attribute for field sofort + attr_reader :sofort + sig { returns(SourceOrder) } + # Attribute for field source_order + attr_reader :source_order + sig { returns(T.nilable(String)) } + # Extra information about a source. This will appear on your customer's statement every time you charge the source. + attr_reader :statement_descriptor + sig { returns(String) } + # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + attr_reader :status + sig { returns(ThreeDSecure) } + # Attribute for field three_d_secure + attr_reader :three_d_secure + sig { returns(String) } + # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + attr_reader :type + sig { returns(T.nilable(String)) } + # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + attr_reader :usage + sig { returns(Wechat) } + # Attribute for field wechat + attr_reader :wechat + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/source_transaction.rbi b/rbi/stripe/resources/source_transaction.rbi new file mode 100644 index 000000000..012793657 --- /dev/null +++ b/rbi/stripe/resources/source_transaction.rbi @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Some payment methods have no required amount that a customer must send. + # Customers can be instructed to send any amount, and it can be made up of + # multiple transactions. As such, sources can have multiple associated + # transactions. + class SourceTransaction < StripeObject + class AchCreditTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :customer_data + sig { returns(String) } + attr_reader :fingerprint + sig { returns(String) } + attr_reader :last4 + sig { returns(String) } + attr_reader :routing_number + end + class ChfCreditTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :reference + sig { returns(String) } + attr_reader :sender_address_country + sig { returns(String) } + attr_reader :sender_address_line1 + sig { returns(String) } + attr_reader :sender_iban + sig { returns(String) } + attr_reader :sender_name + end + class GbpCreditTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :fingerprint + sig { returns(String) } + attr_reader :funding_method + sig { returns(String) } + attr_reader :last4 + sig { returns(String) } + attr_reader :reference + sig { returns(String) } + attr_reader :sender_account_number + sig { returns(String) } + attr_reader :sender_name + sig { returns(String) } + attr_reader :sender_sort_code + end + class PaperCheck < Stripe::StripeObject + sig { returns(String) } + attr_reader :available_at + sig { returns(String) } + attr_reader :invoices + end + class SepaCreditTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :reference + sig { returns(String) } + attr_reader :sender_iban + sig { returns(String) } + attr_reader :sender_name + end + sig { returns(AchCreditTransfer) } + # Attribute for field ach_credit_transfer + attr_reader :ach_credit_transfer + sig { returns(Integer) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + attr_reader :amount + sig { returns(ChfCreditTransfer) } + # Attribute for field chf_credit_transfer + attr_reader :chf_credit_transfer + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(GbpCreditTransfer) } + # Attribute for field gbp_credit_transfer + attr_reader :gbp_credit_transfer + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(PaperCheck) } + # Attribute for field paper_check + attr_reader :paper_check + sig { returns(SepaCreditTransfer) } + # Attribute for field sepa_credit_transfer + attr_reader :sepa_credit_transfer + sig { returns(String) } + # The ID of the source this transaction is attached to. + attr_reader :source + sig { returns(String) } + # The status of the transaction, one of `succeeded`, `pending`, or `failed`. + attr_reader :status + sig { returns(String) } + # The type of source this transaction is attached to. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi new file mode 100644 index 000000000..154b95162 --- /dev/null +++ b/rbi/stripe/resources/subscription.rbi @@ -0,0 +1,375 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Subscriptions allow you to charge a customer on a recurring basis. + # + # Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) + class Subscription < APIResource + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + end + class BillingCycleAnchorConfig < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :day_of_month + sig { returns(T.nilable(Integer)) } + attr_reader :hour + sig { returns(T.nilable(Integer)) } + attr_reader :minute + sig { returns(T.nilable(Integer)) } + attr_reader :month + sig { returns(T.nilable(Integer)) } + attr_reader :second + end + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T.nilable(T::Boolean)) } + attr_reader :reset_billing_cycle_anchor + end + class CancellationDetails < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :comment + sig { returns(T.nilable(String)) } + attr_reader :feedback + sig { returns(T.nilable(String)) } + attr_reader :reason + end + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(Issuer) } + attr_reader :issuer + end + class LastPriceMigrationError < Stripe::StripeObject + class FailedTransition < Stripe::StripeObject + sig { returns(String) } + attr_reader :source_price + sig { returns(String) } + attr_reader :target_price + end + sig { returns(Integer) } + attr_reader :errored_at + sig { returns(T::Array[FailedTransition]) } + attr_reader :failed_transitions + sig { returns(String) } + attr_reader :type + end + class PauseCollection < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + sig { returns(T.nilable(Integer)) } + attr_reader :resumes_at + end + class PaymentSettings < Stripe::StripeObject + class PaymentMethodOptions < Stripe::StripeObject + class AcssDebit < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :transaction_type + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(String) } + attr_reader :verification_method + end + class Bancontact < Stripe::StripeObject + sig { returns(String) } + attr_reader :preferred_language + end + class Card < Stripe::StripeObject + class MandateOptions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount + sig { returns(T.nilable(String)) } + attr_reader :amount_type + sig { returns(T.nilable(String)) } + attr_reader :description + end + sig { returns(MandateOptions) } + attr_reader :mandate_options + sig { returns(T.nilable(String)) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :request_three_d_secure + end + class CustomerBalance < Stripe::StripeObject + class BankTransfer < Stripe::StripeObject + class EuBankTransfer < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + end + sig { returns(EuBankTransfer) } + attr_reader :eu_bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :type + end + sig { returns(BankTransfer) } + attr_reader :bank_transfer + sig { returns(T.nilable(String)) } + attr_reader :funding_type + end + class IdBankTransfer < Stripe::StripeObject; end + class Konbini < Stripe::StripeObject; end + class SepaDebit < Stripe::StripeObject; end + class UsBankAccount < Stripe::StripeObject + class FinancialConnections < Stripe::StripeObject + class Filters < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :account_subcategories + sig { returns(String) } + attr_reader :institution + end + sig { returns(Filters) } + attr_reader :filters + sig { returns(T::Array[String]) } + attr_reader :permissions + sig { returns(T.nilable(T::Array[String])) } + attr_reader :prefetch + end + sig { returns(FinancialConnections) } + attr_reader :financial_connections + sig { returns(String) } + attr_reader :verification_method + end + sig { returns(T.nilable(AcssDebit)) } + attr_reader :acss_debit + sig { returns(T.nilable(Bancontact)) } + attr_reader :bancontact + sig { returns(T.nilable(Card)) } + attr_reader :card + sig { returns(T.nilable(CustomerBalance)) } + attr_reader :customer_balance + sig { returns(T.nilable(IdBankTransfer)) } + attr_reader :id_bank_transfer + sig { returns(T.nilable(Konbini)) } + attr_reader :konbini + sig { returns(T.nilable(SepaDebit)) } + attr_reader :sepa_debit + sig { returns(T.nilable(UsBankAccount)) } + attr_reader :us_bank_account + end + sig { returns(T.nilable(PaymentMethodOptions)) } + attr_reader :payment_method_options + sig { returns(T.nilable(T::Array[String])) } + attr_reader :payment_method_types + sig { returns(T.nilable(String)) } + attr_reader :save_default_payment_method + end + class PendingInvoiceItemInterval < Stripe::StripeObject + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :interval_count + end + class PendingUpdate < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :billing_cycle_anchor + sig { returns(Integer) } + attr_reader :expires_at + sig { returns(T.nilable(Integer)) } + attr_reader :prebilling_iterations + sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) } + attr_reader :subscription_items + sig { returns(T.nilable(Integer)) } + attr_reader :trial_end + sig { returns(T.nilable(T::Boolean)) } + attr_reader :trial_from_plan + end + class Prebilling < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Invoice)) } + attr_reader :invoice + sig { returns(Integer) } + attr_reader :period_end + sig { returns(Integer) } + attr_reader :period_start + sig { returns(String) } + attr_reader :update_behavior + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Float)) } + attr_reader :amount_percent + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + sig { returns(String) } + attr_reader :missing_payment_method + end + sig { returns(EndBehavior) } + attr_reader :end_behavior + end + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the subscription. + attr_reader :application + sig { returns(T.nilable(Float)) } + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + attr_reader :automatic_tax + sig { returns(Integer) } + # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(BillingCycleAnchorConfig)) } + # The fixed values used to calculate the `billing_cycle_anchor`. + attr_reader :billing_cycle_anchor_config + sig { returns(T.nilable(BillingThresholds)) } + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + sig { returns(T.nilable(Integer)) } + # A date in the future at which the subscription will automatically get canceled + attr_reader :cancel_at + sig { returns(T::Boolean) } + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + attr_reader :cancel_at_period_end + sig { returns(T.nilable(Integer)) } + # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + attr_reader :canceled_at + sig { returns(T.nilable(CancellationDetails)) } + # Details about why this subscription was cancelled + attr_reader :cancellation_details + sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(Integer) } + # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + attr_reader :current_period_end + sig { returns(Integer) } + # Start of the current period that the subscription has been invoiced for. + attr_reader :current_period_start + sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription. + attr_reader :customer + sig { returns(T.nilable(Integer)) } + # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + attr_reader :days_until_due + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_reader :default_payment_method + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_reader :default_source + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + attr_reader :default_tax_rates + sig { returns(T.nilable(String)) } + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_reader :discount + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(T.nilable(Integer)) } + # If the subscription has ended, the date the subscription ended. + attr_reader :ended_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings + attr_reader :invoice_settings + sig { returns(Stripe::ListObject) } + # List of subscription items, each with an attached price. + attr_reader :items + sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription. + attr_reader :last_price_migration_error + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The most recent invoice this subscription has generated. + attr_reader :latest_invoice + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(Integer)) } + # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + attr_reader :next_pending_invoice_item_invoice + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + sig { returns(T.nilable(PauseCollection)) } + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection + sig { returns(T.nilable(PaymentSettings)) } + # Payment settings passed on to invoices created by the subscription. + attr_reader :payment_settings + sig { returns(T.nilable(PendingInvoiceItemInterval)) } + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + attr_reader :pending_invoice_item_interval + sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } + # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + attr_reader :pending_setup_intent + sig { returns(T.nilable(PendingUpdate)) } + # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + attr_reader :pending_update + sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. + attr_reader :prebilling + sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } + # The schedule attached to the subscription + attr_reader :schedule + sig { returns(Integer) } + # Date when the subscription was first created. The date might differ from the `created` date due to backdating. + attr_reader :start_date + sig { returns(String) } + # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. + # + # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. + # + # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. + # + # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + # + # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). + # + # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription belongs to. + attr_reader :test_clock + sig { returns(T.nilable(TransferData)) } + # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data + sig { returns(T.nilable(Integer)) } + # If the subscription has a trial, the end of that trial. + attr_reader :trial_end + sig { returns(T.nilable(TrialSettings)) } + # Settings related to subscription trials. + attr_reader :trial_settings + sig { returns(T.nilable(Integer)) } + # If the subscription has a trial, the beginning of that trial. + attr_reader :trial_start + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_item.rbi b/rbi/stripe/resources/subscription_item.rbi new file mode 100644 index 000000000..213f12579 --- /dev/null +++ b/rbi/stripe/resources/subscription_item.rbi @@ -0,0 +1,70 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Subscription items allow you to create customer subscriptions with more than + # one plan, making it easy to represent complex billing relationships. + class SubscriptionItem < APIResource + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :usage_gte + end + class Trial < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :converts_to + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(BillingThresholds)) } + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + attr_reader :billing_thresholds + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Stripe::Plan) } + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + # + # Plans define the base price, currency, and billing cycle for recurring purchases of products. + # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + # + # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + attr_reader :plan + sig { returns(Stripe::Price) } + # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + # + # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + # + # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + attr_reader :price + sig { returns(Integer) } + # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + attr_reader :quantity + sig { returns(String) } + # The `subscription` this `subscription_item` belongs to. + attr_reader :subscription + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_reader :tax_rates + sig { returns(T.nilable(Trial)) } + # Options that configure the trial on the subscription item. + attr_reader :trial + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi new file mode 100644 index 000000000..33d346597 --- /dev/null +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -0,0 +1,349 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + # + # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) + class SubscriptionSchedule < APIResource + class CurrentPhase < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :end_date + sig { returns(Integer) } + attr_reader :start_date + end + class DefaultSettings < Stripe::StripeObject + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + end + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T.nilable(T::Boolean)) } + attr_reader :reset_billing_cycle_anchor + end + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(Issuer) } + attr_reader :issuer + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Float)) } + attr_reader :amount_percent + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + sig { returns(T.nilable(Float)) } + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + attr_reader :automatic_tax + sig { returns(String) } + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(BillingThresholds)) } + attr_reader :billing_thresholds + sig { returns(T.nilable(String)) } + attr_reader :collection_method + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :default_payment_method + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(InvoiceSettings) } + attr_reader :invoice_settings + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + attr_reader :on_behalf_of + sig { returns(T.nilable(TransferData)) } + attr_reader :transfer_data + end + class LastPriceMigrationError < Stripe::StripeObject + class FailedTransition < Stripe::StripeObject + sig { returns(String) } + attr_reader :source_price + sig { returns(String) } + attr_reader :target_price + end + sig { returns(Integer) } + attr_reader :errored_at + sig { returns(T::Array[FailedTransition]) } + attr_reader :failed_transitions + sig { returns(String) } + attr_reader :type + end + class Phase < Stripe::StripeObject + class AddInvoiceItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + sig { returns(T.nilable(Integer)) } + attr_reader :quantity + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :tax_rates + end + class AutomaticTax < Stripe::StripeObject + class Liability < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Boolean) } + attr_reader :enabled + sig { returns(T.nilable(Liability)) } + attr_reader :liability + end + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :amount_gte + sig { returns(T.nilable(T::Boolean)) } + attr_reader :reset_billing_cycle_anchor + end + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class InvoiceSettings < Stripe::StripeObject + class Issuer < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + attr_reader :account_tax_ids + sig { returns(T.nilable(Integer)) } + attr_reader :days_until_due + sig { returns(T.nilable(Issuer)) } + attr_reader :issuer + end + class Item < Stripe::StripeObject + class BillingThresholds < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :usage_gte + end + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class Trial < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :converts_to + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(BillingThresholds)) } + attr_reader :billing_thresholds + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.any(String, Stripe::Plan)) } + attr_reader :plan + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + sig { returns(Integer) } + attr_reader :quantity + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :tax_rates + sig { returns(T.nilable(Trial)) } + attr_reader :trial + end + class PauseCollection < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + end + class TransferData < Stripe::StripeObject + sig { returns(T.nilable(Float)) } + attr_reader :amount_percent + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :destination + end + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :prorate_up_front + end + sig { returns(T.nilable(EndBehavior)) } + attr_reader :end_behavior + end + sig { returns(T::Array[AddInvoiceItem]) } + attr_reader :add_invoice_items + sig { returns(T.nilable(Float)) } + attr_reader :application_fee_percent + sig { returns(AutomaticTax) } + attr_reader :automatic_tax + sig { returns(T.nilable(String)) } + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(BillingThresholds)) } + attr_reader :billing_thresholds + sig { returns(T.nilable(String)) } + attr_reader :collection_method + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(String) } + attr_reader :currency + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + attr_reader :default_payment_method + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :default_tax_rates + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(Integer) } + attr_reader :end_date + sig { returns(T.nilable(InvoiceSettings)) } + attr_reader :invoice_settings + sig { returns(T::Array[Item]) } + attr_reader :items + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + attr_reader :on_behalf_of + sig { returns(T.nilable(PauseCollection)) } + attr_reader :pause_collection + sig { returns(String) } + attr_reader :proration_behavior + sig { returns(Integer) } + attr_reader :start_date + sig { returns(T.nilable(TransferData)) } + attr_reader :transfer_data + sig { returns(T.nilable(String)) } + attr_reader :trial_continuation + sig { returns(T.nilable(Integer)) } + attr_reader :trial_end + sig { returns(T.nilable(TrialSettings)) } + attr_reader :trial_settings + end + class Prebilling < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Invoice)) } + attr_reader :invoice + sig { returns(Integer) } + attr_reader :period_end + sig { returns(Integer) } + attr_reader :period_start + sig { returns(String) } + attr_reader :update_behavior + end + sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the schedule. + attr_reader :application + sig { returns(String) } + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + attr_reader :completed_at + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(CurrentPhase)) } + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + attr_reader :current_phase + sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription schedule. + attr_reader :customer + sig { returns(DefaultSettings) } + # Attribute for field default_settings + attr_reader :default_settings + sig { returns(String) } + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_reader :end_behavior + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription schedule. + attr_reader :last_price_migration_error + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[Phase]) } + # Configuration for the subscription schedule's phases. + attr_reader :phases + sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. + attr_reader :prebilling + sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + attr_reader :released_at + sig { returns(T.nilable(String)) } + # ID of the subscription once managed by the subscription schedule (if it is released). + attr_reader :released_subscription + sig { returns(String) } + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # ID of the subscription managed by the subscription schedule. + attr_reader :subscription + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription schedule belongs to. + attr_reader :test_clock + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/association.rbi b/rbi/stripe/resources/tax/association.rbi new file mode 100644 index 000000000..4e1b7f09d --- /dev/null +++ b/rbi/stripe/resources/tax/association.rbi @@ -0,0 +1,66 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input + class Association < APIResource + class StatusDetails < Stripe::StripeObject + class Committed < Stripe::StripeObject + class Reversal < Stripe::StripeObject + class StatusDetails < Stripe::StripeObject + class Committed < Stripe::StripeObject + sig { returns(String) } + attr_reader :transaction + end + class Errored < Stripe::StripeObject + sig { returns(String) } + attr_reader :reason + sig { returns(String) } + attr_reader :refund_id + end + sig { returns(Committed) } + attr_reader :committed + sig { returns(Errored) } + attr_reader :errored + end + sig { returns(String) } + attr_reader :status + sig { returns(StatusDetails) } + attr_reader :status_details + end + sig { returns(T::Array[Reversal]) } + attr_reader :reversals + sig { returns(String) } + attr_reader :transaction + end + class Errored < Stripe::StripeObject + sig { returns(String) } + attr_reader :reason + end + sig { returns(Committed) } + attr_reader :committed + sig { returns(Errored) } + attr_reader :errored + end + sig { returns(String) } + # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. + attr_reader :calculation + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. + attr_reader :payment_intent + sig { returns(String) } + # Status of the Tax Association. + attr_reader :status + sig { returns(StatusDetails) } + # Attribute for field status_details + attr_reader :status_details + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi new file mode 100644 index 000000000..4e6642365 --- /dev/null +++ b/rbi/stripe/resources/tax/calculation.rbi @@ -0,0 +1,185 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # A Tax Calculation allows you to calculate the tax to collect from your customer. + # + # Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom) + class Calculation < APIResource + class CustomerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class TaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(String) } + attr_reader :value + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :address_source + sig { returns(T.nilable(String)) } + attr_reader :ip_address + sig { returns(T::Array[TaxId]) } + attr_reader :tax_ids + sig { returns(String) } + attr_reader :taxability_override + end + class ShipFromDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + end + class ShippingCost < Stripe::StripeObject + class TaxBreakdown < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :display_name + sig { returns(String) } + attr_reader :level + sig { returns(T.nilable(String)) } + attr_reader :state + end + class TaxRateDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :display_name + sig { returns(String) } + attr_reader :percentage_decimal + sig { returns(String) } + attr_reader :tax_type + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(Jurisdiction) } + attr_reader :jurisdiction + sig { returns(String) } + attr_reader :sourcing + sig { returns(T.nilable(TaxRateDetails)) } + attr_reader :tax_rate_details + sig { returns(String) } + attr_reader :taxability_reason + sig { returns(Integer) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(String) } + attr_reader :shipping_rate + sig { returns(String) } + attr_reader :tax_behavior + sig { returns(T::Array[TaxBreakdown]) } + attr_reader :tax_breakdown + sig { returns(String) } + attr_reader :tax_code + end + class TaxBreakdown < Stripe::StripeObject + class TaxRateDetails < Stripe::StripeObject + class FlatAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + end + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(FlatAmount)) } + attr_reader :flat_amount + sig { returns(String) } + attr_reader :percentage_decimal + sig { returns(T.nilable(String)) } + attr_reader :rate_type + sig { returns(T.nilable(String)) } + attr_reader :state + sig { returns(T.nilable(String)) } + attr_reader :tax_type + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(T::Boolean) } + attr_reader :inclusive + sig { returns(TaxRateDetails) } + attr_reader :tax_rate_details + sig { returns(String) } + attr_reader :taxability_reason + sig { returns(Integer) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_total + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + attr_reader :customer + sig { returns(CustomerDetails) } + # Attribute for field customer_details + attr_reader :customer_details + sig { returns(T.nilable(Integer)) } + # Timestamp of date at which the tax calculation will expire. + attr_reader :expires_at + sig { returns(T.nilable(String)) } + # Unique identifier for the calculation. + attr_reader :id + sig { returns(T.nilable(Stripe::ListObject)) } + # The list of items the customer is purchasing. + attr_reader :line_items + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(ShipFromDetails)) } + # The details of the ship from location, such as the address. + attr_reader :ship_from_details + sig { returns(T.nilable(ShippingCost)) } + # The shipping cost details for the calculation. + attr_reader :shipping_cost + sig { returns(Integer) } + # The amount of tax to be collected on top of the line item prices. + attr_reader :tax_amount_exclusive + sig { returns(Integer) } + # The amount of tax already included in the line item prices. + attr_reader :tax_amount_inclusive + sig { returns(T::Array[TaxBreakdown]) } + # Breakdown of individual tax amounts that add up to the total. + attr_reader :tax_breakdown + sig { returns(Integer) } + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + attr_reader :tax_date + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/calculation_line_item.rbi b/rbi/stripe/resources/tax/calculation_line_item.rbi new file mode 100644 index 000000000..3bc166ad6 --- /dev/null +++ b/rbi/stripe/resources/tax/calculation_line_item.rbi @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + class CalculationLineItem < APIResource + class TaxBreakdown < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :display_name + sig { returns(String) } + attr_reader :level + sig { returns(T.nilable(String)) } + attr_reader :state + end + class TaxRateDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :display_name + sig { returns(String) } + attr_reader :percentage_decimal + sig { returns(String) } + attr_reader :tax_type + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(Jurisdiction) } + attr_reader :jurisdiction + sig { returns(String) } + attr_reader :sourcing + sig { returns(T.nilable(TaxRateDetails)) } + attr_reader :tax_rate_details + sig { returns(String) } + attr_reader :taxability_reason + sig { returns(Integer) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + sig { returns(Integer) } + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + attr_reader :product + sig { returns(Integer) } + # The number of units of the item being purchased. For reversals, this is the quantity reversed. + attr_reader :quantity + sig { returns(T.nilable(String)) } + # A custom identifier for this line item. + attr_reader :reference + sig { returns(String) } + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + sig { returns(T.nilable(T::Array[TaxBreakdown])) } + # Detailed account of taxes relevant to this line item. + attr_reader :tax_breakdown + sig { returns(String) } + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + attr_reader :tax_code + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/form.rbi b/rbi/stripe/resources/tax/form.rbi new file mode 100644 index 000000000..5abaa67c5 --- /dev/null +++ b/rbi/stripe/resources/tax/form.rbi @@ -0,0 +1,126 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes. + # + # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting) + class Form < APIResource + class AuSerr < Stripe::StripeObject + sig { returns(String) } + attr_reader :reporting_period_end_date + sig { returns(String) } + attr_reader :reporting_period_start_date + end + class CaMrdp < Stripe::StripeObject + sig { returns(String) } + attr_reader :reporting_period_end_date + sig { returns(String) } + attr_reader :reporting_period_start_date + end + class EuDac7 < Stripe::StripeObject + sig { returns(String) } + attr_reader :reporting_period_end_date + sig { returns(String) } + attr_reader :reporting_period_start_date + end + class FilingStatus < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :level + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Integer) } + attr_reader :effective_at + sig { returns(Jurisdiction) } + attr_reader :jurisdiction + sig { returns(String) } + attr_reader :value + end + class GbMrdp < Stripe::StripeObject + sig { returns(String) } + attr_reader :reporting_period_end_date + sig { returns(String) } + attr_reader :reporting_period_start_date + end + class NzMrdp < Stripe::StripeObject + sig { returns(String) } + attr_reader :reporting_period_end_date + sig { returns(String) } + attr_reader :reporting_period_start_date + end + class Payee < Stripe::StripeObject + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + attr_reader :account + sig { returns(T.nilable(String)) } + attr_reader :external_reference + sig { returns(String) } + attr_reader :type + end + class Us1099K < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :reporting_year + end + class Us1099Misc < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :reporting_year + end + class Us1099Nec < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :reporting_year + end + sig { returns(AuSerr) } + # Attribute for field au_serr + attr_reader :au_serr + sig { returns(CaMrdp) } + # Attribute for field ca_mrdp + attr_reader :ca_mrdp + sig { returns(T.nilable(T.any(String, Stripe::Tax::Form))) } + # The form that corrects this form, if any. + attr_reader :corrected_by + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(EuDac7) } + # Attribute for field eu_dac7 + attr_reader :eu_dac7 + sig { returns(T::Array[FilingStatus]) } + # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. + attr_reader :filing_statuses + sig { returns(GbMrdp) } + # Attribute for field gb_mrdp + attr_reader :gb_mrdp + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(NzMrdp) } + # Attribute for field nz_mrdp + attr_reader :nz_mrdp + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Payee) } + # Attribute for field payee + attr_reader :payee + sig { returns(String) } + # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. + attr_reader :type + sig { returns(Us1099K) } + # Attribute for field us_1099_k + attr_reader :us_1099_k + sig { returns(Us1099Misc) } + # Attribute for field us_1099_misc + attr_reader :us_1099_misc + sig { returns(Us1099Nec) } + # Attribute for field us_1099_nec + attr_reader :us_1099_nec + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi new file mode 100644 index 000000000..63e35760b --- /dev/null +++ b/rbi/stripe/resources/tax/registration.rbi @@ -0,0 +1,627 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax). + # + # Stripe doesn't register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering). + # + # Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api) + class Registration < APIResource + class CountryOptions < Stripe::StripeObject + class Ae < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class At < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Au < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Be < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Bg < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Bh < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class By < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ca < Stripe::StripeObject + class ProvinceStandard < Stripe::StripeObject + sig { returns(String) } + attr_reader :province + end + sig { returns(ProvinceStandard) } + attr_reader :province_standard + sig { returns(String) } + attr_reader :type + end + class Ch < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Cl < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Co < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Cr < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Cy < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Cz < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class De < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Dk < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Ec < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ee < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Eg < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Es < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Fi < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Fr < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Gb < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ge < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Gr < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Hr < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Hu < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Id < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ie < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Is < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class It < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Jp < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ke < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Kr < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Kz < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Lt < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Lu < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Lv < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Ma < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Md < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Mt < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Mx < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class My < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ng < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Nl < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class No < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Nz < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Om < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Pl < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Pt < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Ro < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Rs < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Ru < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Sa < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Se < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Sg < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Si < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Sk < Stripe::StripeObject + class Standard < Stripe::StripeObject + sig { returns(String) } + attr_reader :place_of_supply_scheme + end + sig { returns(Standard) } + attr_reader :standard + sig { returns(String) } + attr_reader :type + end + class Th < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Tr < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Tz < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Us < Stripe::StripeObject + class LocalAmusementTax < Stripe::StripeObject + sig { returns(String) } + attr_reader :jurisdiction + end + class LocalLeaseTax < Stripe::StripeObject + sig { returns(String) } + attr_reader :jurisdiction + end + class StateSalesTax < Stripe::StripeObject + class Election < Stripe::StripeObject + sig { returns(String) } + attr_reader :jurisdiction + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Array[Election]) } + attr_reader :elections + end + sig { returns(LocalAmusementTax) } + attr_reader :local_amusement_tax + sig { returns(LocalLeaseTax) } + attr_reader :local_lease_tax + sig { returns(String) } + attr_reader :state + sig { returns(StateSalesTax) } + attr_reader :state_sales_tax + sig { returns(String) } + attr_reader :type + end + class Uz < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Vn < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + class Za < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(Ae) } + attr_reader :ae + sig { returns(At) } + attr_reader :at + sig { returns(Au) } + attr_reader :au + sig { returns(Be) } + attr_reader :be + sig { returns(Bg) } + attr_reader :bg + sig { returns(Bh) } + attr_reader :bh + sig { returns(By) } + attr_reader :by + sig { returns(Ca) } + attr_reader :ca + sig { returns(Ch) } + attr_reader :ch + sig { returns(Cl) } + attr_reader :cl + sig { returns(Co) } + attr_reader :co + sig { returns(Cr) } + attr_reader :cr + sig { returns(Cy) } + attr_reader :cy + sig { returns(Cz) } + attr_reader :cz + sig { returns(De) } + attr_reader :de + sig { returns(Dk) } + attr_reader :dk + sig { returns(Ec) } + attr_reader :ec + sig { returns(Ee) } + attr_reader :ee + sig { returns(Eg) } + attr_reader :eg + sig { returns(Es) } + attr_reader :es + sig { returns(Fi) } + attr_reader :fi + sig { returns(Fr) } + attr_reader :fr + sig { returns(Gb) } + attr_reader :gb + sig { returns(Ge) } + attr_reader :ge + sig { returns(Gr) } + attr_reader :gr + sig { returns(Hr) } + attr_reader :hr + sig { returns(Hu) } + attr_reader :hu + sig { returns(Id) } + attr_reader :id + sig { returns(Ie) } + attr_reader :ie + sig { returns(Is) } + attr_reader :is + sig { returns(It) } + attr_reader :it + sig { returns(Jp) } + attr_reader :jp + sig { returns(Ke) } + attr_reader :ke + sig { returns(Kr) } + attr_reader :kr + sig { returns(Kz) } + attr_reader :kz + sig { returns(Lt) } + attr_reader :lt + sig { returns(Lu) } + attr_reader :lu + sig { returns(Lv) } + attr_reader :lv + sig { returns(Ma) } + attr_reader :ma + sig { returns(Md) } + attr_reader :md + sig { returns(Mt) } + attr_reader :mt + sig { returns(Mx) } + attr_reader :mx + sig { returns(My) } + attr_reader :my + sig { returns(Ng) } + attr_reader :ng + sig { returns(Nl) } + attr_reader :nl + sig { returns(No) } + attr_reader :no + sig { returns(Nz) } + attr_reader :nz + sig { returns(Om) } + attr_reader :om + sig { returns(Pl) } + attr_reader :pl + sig { returns(Pt) } + attr_reader :pt + sig { returns(Ro) } + attr_reader :ro + sig { returns(Rs) } + attr_reader :rs + sig { returns(Ru) } + attr_reader :ru + sig { returns(Sa) } + attr_reader :sa + sig { returns(Se) } + attr_reader :se + sig { returns(Sg) } + attr_reader :sg + sig { returns(Si) } + attr_reader :si + sig { returns(Sk) } + attr_reader :sk + sig { returns(Th) } + attr_reader :th + sig { returns(Tr) } + attr_reader :tr + sig { returns(Tz) } + attr_reader :tz + sig { returns(Us) } + attr_reader :us + sig { returns(Uz) } + attr_reader :uz + sig { returns(Vn) } + attr_reader :vn + sig { returns(Za) } + attr_reader :za + end + sig { returns(Integer) } + # Time at which the registration becomes active. Measured in seconds since the Unix epoch. + attr_reader :active_from + sig { returns(String) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + sig { returns(CountryOptions) } + # Attribute for field country_options + attr_reader :country_options + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(Integer)) } + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + attr_reader :expires_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + attr_reader :status + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/settings.rbi b/rbi/stripe/resources/tax/settings.rbi new file mode 100644 index 000000000..996ddc2a1 --- /dev/null +++ b/rbi/stripe/resources/tax/settings.rbi @@ -0,0 +1,65 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # You can use Tax `Settings` to manage configurations used by Stripe Tax calculations. + # + # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) + class Settings < SingletonAPIResource + class Defaults < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :tax_behavior + sig { returns(T.nilable(String)) } + attr_reader :tax_code + end + class HeadOffice < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + end + class StatusDetails < Stripe::StripeObject + class Active < Stripe::StripeObject; end + class Pending < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :missing_fields + end + sig { returns(Active) } + attr_reader :active + sig { returns(Pending) } + attr_reader :pending + end + sig { returns(Defaults) } + # Attribute for field defaults + attr_reader :defaults + sig { returns(T.nilable(HeadOffice)) } + # The place where your business is located. + attr_reader :head_office + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The status of the Tax `Settings`. + attr_reader :status + sig { returns(StatusDetails) } + # Attribute for field status_details + attr_reader :status_details + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/transaction.rbi b/rbi/stripe/resources/tax/transaction.rbi new file mode 100644 index 000000000..3878452f6 --- /dev/null +++ b/rbi/stripe/resources/tax/transaction.rbi @@ -0,0 +1,160 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # A Tax Transaction records the tax collected from or refunded to your customer. + # + # Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction) + class Transaction < APIResource + class CustomerDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + class TaxId < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + sig { returns(String) } + attr_reader :value + end + sig { returns(T.nilable(Address)) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :address_source + sig { returns(T.nilable(String)) } + attr_reader :ip_address + sig { returns(T::Array[TaxId]) } + attr_reader :tax_ids + sig { returns(String) } + attr_reader :taxability_override + end + class Reversal < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :original_transaction + end + class ShipFromDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(String) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + end + class ShippingCost < Stripe::StripeObject + class TaxBreakdown < Stripe::StripeObject + class Jurisdiction < Stripe::StripeObject + sig { returns(String) } + attr_reader :country + sig { returns(String) } + attr_reader :display_name + sig { returns(String) } + attr_reader :level + sig { returns(T.nilable(String)) } + attr_reader :state + end + class TaxRateDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :display_name + sig { returns(String) } + attr_reader :percentage_decimal + sig { returns(String) } + attr_reader :tax_type + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(Jurisdiction) } + attr_reader :jurisdiction + sig { returns(String) } + attr_reader :sourcing + sig { returns(T.nilable(TaxRateDetails)) } + attr_reader :tax_rate_details + sig { returns(String) } + attr_reader :taxability_reason + sig { returns(Integer) } + attr_reader :taxable_amount + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(Integer) } + attr_reader :amount_tax + sig { returns(String) } + attr_reader :shipping_rate + sig { returns(String) } + attr_reader :tax_behavior + sig { returns(T::Array[TaxBreakdown]) } + attr_reader :tax_breakdown + sig { returns(String) } + attr_reader :tax_code + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + attr_reader :customer + sig { returns(CustomerDetails) } + # Attribute for field customer_details + attr_reader :customer_details + sig { returns(String) } + # Unique identifier for the transaction. + attr_reader :id + sig { returns(T.nilable(Stripe::ListObject)) } + # The tax collected or refunded, by line item. + attr_reader :line_items + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # The Unix timestamp representing when the tax liability is assumed or reduced. + attr_reader :posted_at + sig { returns(String) } + # A custom unique identifier, such as 'myOrder_123'. + attr_reader :reference + sig { returns(T.nilable(Reversal)) } + # If `type=reversal`, contains information about what was reversed. + attr_reader :reversal + sig { returns(T.nilable(ShipFromDetails)) } + # The details of the ship from location, such as the address. + attr_reader :ship_from_details + sig { returns(T.nilable(ShippingCost)) } + # The shipping cost details for the transaction. + attr_reader :shipping_cost + sig { returns(Integer) } + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + attr_reader :tax_date + sig { returns(String) } + # If `reversal`, this transaction reverses an earlier transaction. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/transaction_line_item.rbi b/rbi/stripe/resources/tax/transaction_line_item.rbi new file mode 100644 index 000000000..ec51fc04c --- /dev/null +++ b/rbi/stripe/resources/tax/transaction_line_item.rbi @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + class TransactionLineItem < APIResource + class Reversal < Stripe::StripeObject + sig { returns(String) } + attr_reader :original_line_item + end + sig { returns(Integer) } + # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + sig { returns(Integer) } + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + attr_reader :product + sig { returns(Integer) } + # The number of units of the item being purchased. For reversals, this is the quantity reversed. + attr_reader :quantity + sig { returns(String) } + # A custom identifier for this line item in the transaction. + attr_reader :reference + sig { returns(T.nilable(Reversal)) } + # If `type=reversal`, contains information about what was reversed. + attr_reader :reversal + sig { returns(String) } + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + sig { returns(String) } + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + attr_reader :tax_code + sig { returns(String) } + # If `reversal`, this line item reverses an earlier transaction. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_code.rbi b/rbi/stripe/resources/tax_code.rbi new file mode 100644 index 000000000..85eb4bb00 --- /dev/null +++ b/rbi/stripe/resources/tax_code.rbi @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. + class TaxCode < APIResource + sig { returns(String) } + # A detailed description of which types of products the tax code represents. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # A short name for the tax code. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_id.rbi b/rbi/stripe/resources/tax_id.rbi new file mode 100644 index 000000000..d44d7c344 --- /dev/null +++ b/rbi/stripe/resources/tax_id.rbi @@ -0,0 +1,62 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account. + # Customer and account tax IDs get displayed on related invoices and credit notes. + # + # Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids) + class TaxId < APIResource + class Owner < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Account)) } + attr_reader :account + sig { returns(T.any(String, Stripe::Application)) } + attr_reader :application + sig { returns(T.any(String, Stripe::Customer)) } + attr_reader :customer + sig { returns(String) } + attr_reader :type + end + class Verification < Stripe::StripeObject + sig { returns(String) } + attr_reader :status + sig { returns(T.nilable(String)) } + attr_reader :verified_address + sig { returns(T.nilable(String)) } + attr_reader :verified_name + end + sig { returns(T.nilable(String)) } + # Two-letter ISO code representing the country of the tax ID. + attr_reader :country + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the customer. + attr_reader :customer + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Owner)) } + # The account or customer the tax ID belongs to. + attr_reader :owner + sig { returns(String) } + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + attr_reader :type + sig { returns(String) } + # Value of the tax ID. + attr_reader :value + sig { returns(T.nilable(Verification)) } + # Tax ID verification information. + attr_reader :verification + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi new file mode 100644 index 000000000..3ff9bf30e --- /dev/null +++ b/rbi/stripe/resources/tax_rate.rbi @@ -0,0 +1,72 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + class TaxRate < APIResource + class FlatAmount < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :currency + end + sig { returns(T::Boolean) } + # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + attr_reader :active + sig { returns(T.nilable(String)) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_reader :description + sig { returns(String) } + # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + attr_reader :display_name + sig { returns(T.nilable(Float)) } + # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + # this percentage reflects the rate actually used to calculate tax based on the product's taxability + # and whether the user is registered to collect taxes in the corresponding jurisdiction. + attr_reader :effective_percentage + sig { returns(T.nilable(FlatAmount)) } + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + attr_reader :flat_amount + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # This specifies if the tax rate is inclusive or exclusive. + attr_reader :inclusive + sig { returns(T.nilable(String)) } + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_reader :jurisdiction + sig { returns(T.nilable(String)) } + # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + attr_reader :jurisdiction_level + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Float) } + # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + attr_reader :percentage + sig { returns(T.nilable(String)) } + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + attr_reader :rate_type + sig { returns(T.nilable(String)) } + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state + sig { returns(T.nilable(String)) } + # The high-level tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi new file mode 100644 index 000000000..f91710ff0 --- /dev/null +++ b/rbi/stripe/resources/terminal/configuration.rbi @@ -0,0 +1,220 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Terminal + # A Configurations object represents how features should be configured for terminal readers. + class Configuration < APIResource + class BbposWiseposE < Stripe::StripeObject + sig { returns(T.any(String, Stripe::File)) } + attr_reader :splashscreen + end + class Offline < Stripe::StripeObject + sig { returns(T.nilable(T::Boolean)) } + attr_reader :enabled + end + class RebootWindow < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :end_hour + sig { returns(Integer) } + attr_reader :start_hour + end + class StripeS700 < Stripe::StripeObject + sig { returns(T.any(String, Stripe::File)) } + attr_reader :splashscreen + end + class Tipping < Stripe::StripeObject + class Aud < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Cad < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Chf < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Czk < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Dkk < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Eur < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Gbp < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Hkd < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Myr < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Nok < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Nzd < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Pln < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Sek < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Sgd < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + class Usd < Stripe::StripeObject + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :fixed_amounts + sig { returns(T.nilable(T::Array[Integer])) } + attr_reader :percentages + sig { returns(Integer) } + attr_reader :smart_tip_threshold + end + sig { returns(Aud) } + attr_reader :aud + sig { returns(Cad) } + attr_reader :cad + sig { returns(Chf) } + attr_reader :chf + sig { returns(Czk) } + attr_reader :czk + sig { returns(Dkk) } + attr_reader :dkk + sig { returns(Eur) } + attr_reader :eur + sig { returns(Gbp) } + attr_reader :gbp + sig { returns(Hkd) } + attr_reader :hkd + sig { returns(Myr) } + attr_reader :myr + sig { returns(Nok) } + attr_reader :nok + sig { returns(Nzd) } + attr_reader :nzd + sig { returns(Pln) } + attr_reader :pln + sig { returns(Sek) } + attr_reader :sek + sig { returns(Sgd) } + attr_reader :sgd + sig { returns(Usd) } + attr_reader :usd + end + class VerifoneP400 < Stripe::StripeObject + sig { returns(T.any(String, Stripe::File)) } + attr_reader :splashscreen + end + sig { returns(BbposWiseposE) } + # Attribute for field bbpos_wisepos_e + attr_reader :bbpos_wisepos_e + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(T::Boolean)) } + # Whether this Configuration is the default for your account + attr_reader :is_account_default + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # String indicating the name of the Configuration object, set by the user + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Offline) } + # Attribute for field offline + attr_reader :offline + sig { returns(RebootWindow) } + # Attribute for field reboot_window + attr_reader :reboot_window + sig { returns(StripeS700) } + # Attribute for field stripe_s700 + attr_reader :stripe_s700 + sig { returns(Tipping) } + # Attribute for field tipping + attr_reader :tipping + sig { returns(VerifoneP400) } + # Attribute for field verifone_p400 + attr_reader :verifone_p400 + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/connection_token.rbi b/rbi/stripe/resources/terminal/connection_token.rbi new file mode 100644 index 000000000..19fd36e07 --- /dev/null +++ b/rbi/stripe/resources/terminal/connection_token.rbi @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Terminal + # A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + # + # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + class ConnectionToken < APIResource + sig { returns(String) } + # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + attr_reader :location + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Your application should pass this token to the Stripe Terminal SDK. + attr_reader :secret + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi new file mode 100644 index 000000000..dea0366ce --- /dev/null +++ b/rbi/stripe/resources/terminal/location.rbi @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Terminal + # A Location represents a grouping of readers. + # + # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) + class Location < APIResource + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + # Attribute for field address + attr_reader :address + sig { returns(String) } + # The ID of a configuration that will be used to customize all readers in this location. + attr_reader :configuration_overrides + sig { returns(String) } + # The display name of the location. + attr_reader :display_name + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi new file mode 100644 index 000000000..7a1a96ebc --- /dev/null +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -0,0 +1,267 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Terminal + # A Reader represents a physical device for accepting payment details. + # + # Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader) + class Reader < APIResource + class Action < Stripe::StripeObject + class CollectInputs < Stripe::StripeObject + class Input < Stripe::StripeObject + class CustomText < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :skip_button + sig { returns(T.nilable(String)) } + attr_reader :submit_button + sig { returns(T.nilable(String)) } + attr_reader :title + end + class Email < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Numeric < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Phone < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Selection < Stripe::StripeObject + class Choice < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :style + sig { returns(String) } + attr_reader :value + end + sig { returns(T::Array[Choice]) } + attr_reader :choices + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Signature < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Text < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :value + end + class Toggle < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :default_value + sig { returns(T.nilable(String)) } + attr_reader :description + sig { returns(T.nilable(String)) } + attr_reader :title + sig { returns(T.nilable(String)) } + attr_reader :value + end + sig { returns(T.nilable(CustomText)) } + attr_reader :custom_text + sig { returns(Email) } + attr_reader :email + sig { returns(Numeric) } + attr_reader :numeric + sig { returns(Phone) } + attr_reader :phone + sig { returns(T.nilable(T::Boolean)) } + attr_reader :required + sig { returns(Selection) } + attr_reader :selection + sig { returns(Signature) } + attr_reader :signature + sig { returns(T::Boolean) } + attr_reader :skipped + sig { returns(Text) } + attr_reader :text + sig { returns(T.nilable(T::Array[Toggle])) } + attr_reader :toggles + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Array[Input]) } + attr_reader :inputs + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + end + class CollectPaymentMethod < Stripe::StripeObject + class CollectConfig < Stripe::StripeObject + class Tipping < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount_eligible + end + sig { returns(T::Boolean) } + attr_reader :enable_customer_cancellation + sig { returns(T::Boolean) } + attr_reader :skip_tipping + sig { returns(Tipping) } + attr_reader :tipping + end + sig { returns(CollectConfig) } + attr_reader :collect_config + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + sig { returns(Stripe::PaymentMethod) } + attr_reader :payment_method + sig { returns(String) } + attr_reader :stripe_account + end + class ConfirmPaymentIntent < Stripe::StripeObject + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + sig { returns(String) } + attr_reader :stripe_account + end + class ProcessPaymentIntent < Stripe::StripeObject + class ProcessConfig < Stripe::StripeObject + class Tipping < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount_eligible + end + sig { returns(T::Boolean) } + attr_reader :enable_customer_cancellation + sig { returns(T::Boolean) } + attr_reader :skip_tipping + sig { returns(Tipping) } + attr_reader :tipping + end + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + sig { returns(ProcessConfig) } + attr_reader :process_config + sig { returns(String) } + attr_reader :stripe_account + end + class ProcessSetupIntent < Stripe::StripeObject + class ProcessConfig < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enable_customer_cancellation + end + sig { returns(String) } + attr_reader :generated_card + sig { returns(ProcessConfig) } + attr_reader :process_config + sig { returns(T.any(String, Stripe::SetupIntent)) } + attr_reader :setup_intent + end + class RefundPayment < Stripe::StripeObject + class RefundPaymentConfig < Stripe::StripeObject + sig { returns(T::Boolean) } + attr_reader :enable_customer_cancellation + end + sig { returns(Integer) } + attr_reader :amount + sig { returns(T.any(String, Stripe::Charge)) } + attr_reader :charge + sig { returns(T::Hash[String, String]) } + attr_reader :metadata + sig { returns(T.any(String, Stripe::PaymentIntent)) } + attr_reader :payment_intent + sig { returns(String) } + attr_reader :reason + sig { returns(T.any(String, Stripe::Refund)) } + attr_reader :refund + sig { returns(T::Boolean) } + attr_reader :refund_application_fee + sig { returns(RefundPaymentConfig) } + attr_reader :refund_payment_config + sig { returns(T::Boolean) } + attr_reader :reverse_transfer + sig { returns(String) } + attr_reader :stripe_account + end + class SetReaderDisplay < Stripe::StripeObject + class Cart < Stripe::StripeObject + class LineItem < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :amount + sig { returns(String) } + attr_reader :description + sig { returns(Integer) } + attr_reader :quantity + end + sig { returns(String) } + attr_reader :currency + sig { returns(T::Array[LineItem]) } + attr_reader :line_items + sig { returns(T.nilable(Integer)) } + attr_reader :tax + sig { returns(Integer) } + attr_reader :total + end + sig { returns(T.nilable(Cart)) } + attr_reader :cart + sig { returns(String) } + attr_reader :type + end + sig { returns(CollectInputs) } + attr_reader :collect_inputs + sig { returns(CollectPaymentMethod) } + attr_reader :collect_payment_method + sig { returns(ConfirmPaymentIntent) } + attr_reader :confirm_payment_intent + sig { returns(T.nilable(String)) } + attr_reader :failure_code + sig { returns(T.nilable(String)) } + attr_reader :failure_message + sig { returns(ProcessPaymentIntent) } + attr_reader :process_payment_intent + sig { returns(ProcessSetupIntent) } + attr_reader :process_setup_intent + sig { returns(RefundPayment) } + attr_reader :refund_payment + sig { returns(SetReaderDisplay) } + attr_reader :set_reader_display + sig { returns(String) } + attr_reader :status + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(Action)) } + # The most recent action performed by the reader. + attr_reader :action + sig { returns(T.nilable(String)) } + # The current software version of the reader. + attr_reader :device_sw_version + sig { returns(String) } + # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. + attr_reader :device_type + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # The local IP address of the reader. + attr_reader :ip_address + sig { returns(String) } + # Custom label given to the reader for easier identification. + attr_reader :label + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) } + # The location identifier of the reader. + attr_reader :location + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Serial number of the reader. + attr_reader :serial_number + sig { returns(T.nilable(String)) } + # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + attr_reader :status + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/reader_collected_data.rbi b/rbi/stripe/resources/terminal/reader_collected_data.rbi new file mode 100644 index 000000000..43980009e --- /dev/null +++ b/rbi/stripe/resources/terminal/reader_collected_data.rbi @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Terminal + # Returns data collected by Terminal readers. This data is only stored for 24 hours. + class ReaderCollectedData < APIResource + class Magstripe < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :data + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(Magstripe)) } + # The magstripe data collected by the reader. + attr_reader :magstripe + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The type of data collected by the reader. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/test_helpers/test_clock.rbi b/rbi/stripe/resources/test_helpers/test_clock.rbi new file mode 100644 index 000000000..913ddd01f --- /dev/null +++ b/rbi/stripe/resources/test_helpers/test_clock.rbi @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module TestHelpers + # A test clock enables deterministic control over objects in testmode. With a test clock, you can create + # objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + # you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + class TestClock < APIResource + class StatusDetails < Stripe::StripeObject + class Advancing < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :target_frozen_time + end + sig { returns(Advancing) } + attr_reader :advancing + end + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(Integer) } + # Time at which this clock is scheduled to auto delete. + attr_reader :deletes_after + sig { returns(Integer) } + # Time at which all objects belonging to this clock are frozen. + attr_reader :frozen_time + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(String)) } + # The custom name supplied at creation. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The status of the Test Clock. + attr_reader :status + sig { returns(StatusDetails) } + # Attribute for field status_details + attr_reader :status_details + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi new file mode 100644 index 000000000..6ec6cf013 --- /dev/null +++ b/rbi/stripe/resources/token.rbi @@ -0,0 +1,64 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Tokenization is the process Stripe uses to collect sensitive card or bank + # account details, or personally identifiable information (PII), directly from + # your customers in a secure manner. A token representing this information is + # returned to your server to use. Use our + # [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + # on the client-side. This guarantees that no sensitive card data touches your server, + # and allows your integration to operate in a PCI-compliant way. + # + # If you can't use client-side tokenization, you can also create tokens using + # the API with either your publishable or secret API key. If + # your integration uses this method, you're responsible for any PCI compliance + # that it might require, and you must keep your secret API key safe. Unlike with + # client-side tokenization, your customer's information isn't sent directly to + # Stripe, so we can't determine how it's handled or stored. + # + # You can't store or use tokens more than once. To store card or bank account + # information for later use, create [Customer](https://stripe.com/docs/api#customers) + # objects or [External accounts](https://stripe.com/api#external_accounts). + # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + # performs best with integrations that use client-side tokenization. + class Token < APIResource + sig { returns(Stripe::BankAccount) } + # These bank accounts are payment methods on `Customer` objects. + # + # On the other hand [External Accounts](/api#external_accounts) are transfer + # destinations on `Account` objects for connected accounts. + # They can be bank accounts or debit cards as well, and are documented in the links above. + # + # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + attr_reader :bank_account + sig { returns(Stripe::Card) } + # You can store multiple cards on a customer in order to charge the customer + # later. You can also store multiple debit cards on a recipient in order to + # transfer to those cards later. + # + # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + attr_reader :card + sig { returns(T.nilable(String)) } + # IP address of the client that generates the token. + attr_reader :client_ip + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Type of the token: `account`, `bank_account`, `card`, or `pii`. + attr_reader :type + sig { returns(T::Boolean) } + # Determines if you have already used this token (you can only use tokens once). + attr_reader :used + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/topup.rbi b/rbi/stripe/resources/topup.rbi new file mode 100644 index 000000000..fedf08bf0 --- /dev/null +++ b/rbi/stripe/resources/topup.rbi @@ -0,0 +1,60 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # To top up your Stripe balance, you create a top-up object. You can retrieve + # individual top-ups, as well as list all top-ups. Top-ups are identified by a + # unique, random ID. + # + # Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) + class Topup < APIResource + sig { returns(Integer) } + # Amount transferred. + attr_reader :amount + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + attr_reader :balance_transaction + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(Integer)) } + # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + attr_reader :expected_availability_date + sig { returns(T.nilable(String)) } + # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). + attr_reader :failure_code + sig { returns(T.nilable(String)) } + # Message to user further explaining reason for top-up failure if available. + attr_reader :failure_message + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(Stripe::Source)) } + # The source field is deprecated. It might not always be present in the API response. + attr_reader :source + sig { returns(T.nilable(String)) } + # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + attr_reader :statement_descriptor + sig { returns(String) } + # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + attr_reader :status + sig { returns(T.nilable(String)) } + # A string that identifies this top-up as part of a group. + attr_reader :transfer_group + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/transfer.rbi b/rbi/stripe/resources/transfer.rbi new file mode 100644 index 000000000..c07fd065e --- /dev/null +++ b/rbi/stripe/resources/transfer.rbi @@ -0,0 +1,68 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A `Transfer` object is created when you move funds between Stripe accounts as + # part of Connect. + # + # Before April 6, 2017, transfers also represented movement of funds from a + # Stripe account to a card or bank account. This behavior has since been split + # out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + # information, read about the + # [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + # + # Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) + class Transfer < APIResource + sig { returns(Integer) } + # Amount in cents (or local equivalent) to be transferred. + attr_reader :amount + sig { returns(Integer) } + # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + attr_reader :amount_reversed + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact of this transfer on your account balance. + attr_reader :balance_transaction + sig { returns(Integer) } + # Time that this record of the transfer was first created. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # ID of the Stripe account the transfer was sent to. + attr_reader :destination + sig { returns(T.any(String, Stripe::Charge)) } + # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + attr_reader :destination_payment + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Stripe::ListObject) } + # A list of reversals that have been applied to the transfer. + attr_reader :reversals + sig { returns(T::Boolean) } + # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + attr_reader :reversed + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + attr_reader :source_transaction + sig { returns(String) } + # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + attr_reader :source_type + sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_reader :transfer_group + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/credit_reversal.rbi b/rbi/stripe/resources/treasury/credit_reversal.rbi new file mode 100644 index 000000000..561f22e1a --- /dev/null +++ b/rbi/stripe/resources/treasury/credit_reversal.rbi @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + class CreditReversal < APIResource + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :posted_at + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # The FinancialAccount to reverse funds from. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The rails used to reverse the funds. + attr_reader :network + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The ReceivedCredit being reversed. + attr_reader :received_credit + sig { returns(String) } + # Status of the CreditReversal + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/debit_reversal.rbi b/rbi/stripe/resources/treasury/debit_reversal.rbi new file mode 100644 index 000000000..640b24fe2 --- /dev/null +++ b/rbi/stripe/resources/treasury/debit_reversal.rbi @@ -0,0 +1,63 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + class DebitReversal < APIResource + class LinkedFlows < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :issuing_dispute + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :completed_at + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # The FinancialAccount to reverse funds from. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(LinkedFlows)) } + # Other flows linked to a DebitReversal. + attr_reader :linked_flows + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # The rails used to reverse the funds. + attr_reader :network + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The ReceivedDebit being reversed. + attr_reader :received_debit + sig { returns(String) } + # Status of the DebitReversal + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi new file mode 100644 index 000000000..144dcb3d0 --- /dev/null +++ b/rbi/stripe/resources/treasury/financial_account.rbi @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + # FinancialAccounts serve as the source and destination of Treasury's money movement APIs. + class FinancialAccount < APIResource + class Balance < Stripe::StripeObject + sig { returns(T::Hash[String, Integer]) } + attr_reader :cash + sig { returns(T::Hash[String, Integer]) } + attr_reader :inbound_pending + sig { returns(T::Hash[String, Integer]) } + attr_reader :outbound_pending + end + class FinancialAddress < Stripe::StripeObject + class Aba < Stripe::StripeObject + sig { returns(String) } + attr_reader :account_holder_name + sig { returns(T.nilable(String)) } + attr_reader :account_number + sig { returns(String) } + attr_reader :account_number_last4 + sig { returns(String) } + attr_reader :bank_name + sig { returns(String) } + attr_reader :routing_number + end + sig { returns(Aba) } + attr_reader :aba + sig { returns(T::Array[String]) } + attr_reader :supported_networks + sig { returns(String) } + attr_reader :type + end + class PlatformRestrictions < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :inbound_flows + sig { returns(T.nilable(String)) } + attr_reader :outbound_flows + end + class StatusDetails < Stripe::StripeObject + class Closed < Stripe::StripeObject + sig { returns(T::Array[String]) } + attr_reader :reasons + end + sig { returns(T.nilable(Closed)) } + attr_reader :closed + end + sig { returns(T::Array[String]) } + # The array of paths to active Features in the Features hash. + attr_reader :active_features + sig { returns(Balance) } + # Balance information for the FinancialAccount + attr_reader :balance + sig { returns(String) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + attr_reader :display_name + sig { returns(Stripe::Treasury::FinancialAccountFeatures) } + # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + # Stripe or the platform can control Features via the requested field. + attr_reader :features + sig { returns(T::Array[FinancialAddress]) } + # The set of credentials that resolve to a FinancialAccount. + attr_reader :financial_addresses + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Array[String]) } + # The array of paths to pending Features in the Features hash. + attr_reader :pending_features + sig { returns(T.nilable(PlatformRestrictions)) } + # The set of functionalities that the platform can restrict on the FinancialAccount. + attr_reader :platform_restrictions + sig { returns(T::Array[String]) } + # The array of paths to restricted Features in the Features hash. + attr_reader :restricted_features + sig { returns(String) } + # Status of this FinancialAccount. + attr_reader :status + sig { returns(StatusDetails) } + # Attribute for field status_details + attr_reader :status_details + sig { returns(T::Array[String]) } + # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + attr_reader :supported_currencies + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/financial_account_features.rbi b/rbi/stripe/resources/treasury/financial_account_features.rbi new file mode 100644 index 000000000..4b6578ea5 --- /dev/null +++ b/rbi/stripe/resources/treasury/financial_account_features.rbi @@ -0,0 +1,201 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + # Stripe or the platform can control Features via the requested field. + class FinancialAccountFeatures < APIResource + class CardIssuing < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + class DepositInsurance < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + class FinancialAddresses < Stripe::StripeObject + class Aba < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(String) } + attr_reader :bank + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + sig { returns(Aba) } + attr_reader :aba + end + class InboundTransfers < Stripe::StripeObject + class Ach < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + sig { returns(Ach) } + attr_reader :ach + end + class IntraStripeFlows < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + class OutboundPayments < Stripe::StripeObject + class Ach < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + class UsDomesticWire < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + sig { returns(Ach) } + attr_reader :ach + sig { returns(UsDomesticWire) } + attr_reader :us_domestic_wire + end + class OutboundTransfers < Stripe::StripeObject + class Ach < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + class UsDomesticWire < Stripe::StripeObject + class StatusDetail < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.nilable(String)) } + attr_reader :resolution + sig { returns(String) } + attr_reader :restriction + end + sig { returns(T::Boolean) } + attr_reader :requested + sig { returns(String) } + attr_reader :status + sig { returns(T::Array[StatusDetail]) } + attr_reader :status_details + end + sig { returns(Ach) } + attr_reader :ach + sig { returns(UsDomesticWire) } + attr_reader :us_domestic_wire + end + sig { returns(CardIssuing) } + # Toggle settings for enabling/disabling a feature + attr_reader :card_issuing + sig { returns(DepositInsurance) } + # Toggle settings for enabling/disabling a feature + attr_reader :deposit_insurance + sig { returns(FinancialAddresses) } + # Settings related to Financial Addresses features on a Financial Account + attr_reader :financial_addresses + sig { returns(InboundTransfers) } + # InboundTransfers contains inbound transfers features for a FinancialAccount. + attr_reader :inbound_transfers + sig { returns(IntraStripeFlows) } + # Toggle settings for enabling/disabling a feature + attr_reader :intra_stripe_flows + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(OutboundPayments) } + # Settings related to Outbound Payments features on a Financial Account + attr_reader :outbound_payments + sig { returns(OutboundTransfers) } + # OutboundTransfers contains outbound transfers features for a FinancialAccount. + attr_reader :outbound_transfers + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/inbound_transfer.rbi b/rbi/stripe/resources/treasury/inbound_transfer.rbi new file mode 100644 index 000000000..9aa507d17 --- /dev/null +++ b/rbi/stripe/resources/treasury/inbound_transfer.rbi @@ -0,0 +1,136 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + class InboundTransfer < APIResource + class FailureDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + end + class LinkedFlows < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :received_debit + end + class OriginPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + end + class UsBankAccount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.any(String, Stripe::Mandate)) } + attr_reader :mandate + sig { returns(String) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + sig { returns(BillingDetails) } + attr_reader :billing_details + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + attr_reader :failed_at + sig { returns(T.nilable(Integer)) } + attr_reader :succeeded_at + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(T::Boolean) } + # Returns `true` if the InboundTransfer is able to be canceled. + attr_reader :cancelable + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(FailureDetails)) } + # Details about this InboundTransfer's failure. Only set when status is `failed`. + attr_reader :failure_details + sig { returns(String) } + # The FinancialAccount that received the funds. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(LinkedFlows) } + # Attribute for field linked_flows + attr_reader :linked_flows + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # The origin payment method to be debited for an InboundTransfer. + attr_reader :origin_payment_method + sig { returns(T.nilable(OriginPaymentMethodDetails)) } + # Details about the PaymentMethod for an InboundTransfer. + attr_reader :origin_payment_method_details + sig { returns(T.nilable(T::Boolean)) } + # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + attr_reader :returned + sig { returns(String) } + # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. + attr_reader :statement_descriptor + sig { returns(String) } + # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/outbound_payment.rbi b/rbi/stripe/resources/treasury/outbound_payment.rbi new file mode 100644 index 000000000..4d3bacaca --- /dev/null +++ b/rbi/stripe/resources/treasury/outbound_payment.rbi @@ -0,0 +1,178 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + class OutboundPayment < APIResource + class DestinationPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + end + class FinancialAccount < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :network + end + class UsBankAccount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.any(String, Stripe::Mandate)) } + attr_reader :mandate + sig { returns(String) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + sig { returns(BillingDetails) } + attr_reader :billing_details + sig { returns(FinancialAccount) } + attr_reader :financial_account + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class EndUserDetails < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :ip_address + sig { returns(T::Boolean) } + attr_reader :present + end + class ReturnedDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + attr_reader :transaction + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + attr_reader :failed_at + sig { returns(T.nilable(Integer)) } + attr_reader :posted_at + sig { returns(T.nilable(Integer)) } + attr_reader :returned_at + end + class TrackingDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + sig { returns(String) } + attr_reader :trace_id + end + class UsDomesticWire < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :chips + sig { returns(T.nilable(String)) } + attr_reader :imad + sig { returns(T.nilable(String)) } + attr_reader :omad + end + sig { returns(Ach) } + attr_reader :ach + sig { returns(String) } + attr_reader :type + sig { returns(UsDomesticWire) } + attr_reader :us_domestic_wire + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(T::Boolean) } + # Returns `true` if the object can be canceled, and `false` otherwise. + attr_reader :cancelable + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. + attr_reader :customer + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(String)) } + # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + attr_reader :destination_payment_method + sig { returns(T.nilable(DestinationPaymentMethodDetails)) } + # Details about the PaymentMethod for an OutboundPayment. + attr_reader :destination_payment_method_details + sig { returns(T.nilable(EndUserDetails)) } + # Details about the end user. + attr_reader :end_user_details + sig { returns(Integer) } + # The date when funds are expected to arrive in the destination account. + attr_reader :expected_arrival_date + sig { returns(String) } + # The FinancialAccount that funds were pulled from. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(ReturnedDetails)) } + # Details about a returned OutboundPayment. Only set when the status is `returned`. + attr_reader :returned_details + sig { returns(String) } + # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + attr_reader :statement_descriptor + sig { returns(String) } + # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(TrackingDetails)) } + # Details about network-specific tracking information if available. + attr_reader :tracking_details + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/outbound_transfer.rbi b/rbi/stripe/resources/treasury/outbound_transfer.rbi new file mode 100644 index 000000000..1a0b477d9 --- /dev/null +++ b/rbi/stripe/resources/treasury/outbound_transfer.rbi @@ -0,0 +1,171 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + class OutboundTransfer < APIResource + class DestinationPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + end + class UsBankAccount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + sig { returns(T.nilable(String)) } + attr_reader :account_type + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :fingerprint + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.any(String, Stripe::Mandate)) } + attr_reader :mandate + sig { returns(String) } + attr_reader :network + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + sig { returns(BillingDetails) } + attr_reader :billing_details + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class NetworkDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :addenda + end + sig { returns(T.nilable(Ach)) } + attr_reader :ach + sig { returns(String) } + attr_reader :type + end + class ReturnedDetails < Stripe::StripeObject + sig { returns(String) } + attr_reader :code + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + attr_reader :transaction + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + sig { returns(T.nilable(Integer)) } + attr_reader :failed_at + sig { returns(T.nilable(Integer)) } + attr_reader :posted_at + sig { returns(T.nilable(Integer)) } + attr_reader :returned_at + end + class TrackingDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + sig { returns(String) } + attr_reader :trace_id + end + class UsDomesticWire < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :chips + sig { returns(T.nilable(String)) } + attr_reader :imad + sig { returns(T.nilable(String)) } + attr_reader :omad + end + sig { returns(Ach) } + attr_reader :ach + sig { returns(String) } + attr_reader :type + sig { returns(UsDomesticWire) } + attr_reader :us_domestic_wire + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(T::Boolean) } + # Returns `true` if the object can be canceled, and `false` otherwise. + attr_reader :cancelable + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(String)) } + # The PaymentMethod used as the payment instrument for an OutboundTransfer. + attr_reader :destination_payment_method + sig { returns(DestinationPaymentMethodDetails) } + # Attribute for field destination_payment_method_details + attr_reader :destination_payment_method_details + sig { returns(Integer) } + # The date when funds are expected to arrive in the destination account. + attr_reader :expected_arrival_date + sig { returns(String) } + # The FinancialAccount that funds were pulled from. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(T.nilable(NetworkDetails)) } + # Details about the network used for the OutboundTransfer. + attr_reader :network_details + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(ReturnedDetails)) } + # Details about a returned OutboundTransfer. Only set when the status is `returned`. + attr_reader :returned_details + sig { returns(String) } + # Information about the OutboundTransfer to be sent to the recipient account. + attr_reader :statement_descriptor + sig { returns(String) } + # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + sig { returns(T.nilable(TrackingDetails)) } + # Details about network-specific tracking information if available. + attr_reader :tracking_details + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/received_credit.rbi b/rbi/stripe/resources/treasury/received_credit.rbi new file mode 100644 index 000000000..9e005f9da --- /dev/null +++ b/rbi/stripe/resources/treasury/received_credit.rbi @@ -0,0 +1,151 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + class ReceivedCredit < APIResource + class InitiatingPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + end + class FinancialAccount < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :network + end + class UsBankAccount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + sig { returns(String) } + attr_reader :balance + sig { returns(BillingDetails) } + attr_reader :billing_details + sig { returns(FinancialAccount) } + attr_reader :financial_account + sig { returns(String) } + attr_reader :issuing_card + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class LinkedFlows < Stripe::StripeObject + class SourceFlowDetails < Stripe::StripeObject + sig { returns(Stripe::Treasury::CreditReversal) } + attr_reader :credit_reversal + sig { returns(Stripe::Treasury::OutboundPayment) } + attr_reader :outbound_payment + sig { returns(Stripe::Payout) } + attr_reader :payout + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(String)) } + attr_reader :credit_reversal + sig { returns(T.nilable(String)) } + attr_reader :issuing_authorization + sig { returns(T.nilable(String)) } + attr_reader :issuing_transaction + sig { returns(T.nilable(String)) } + attr_reader :source_flow + sig { returns(T.nilable(SourceFlowDetails)) } + attr_reader :source_flow_details + sig { returns(T.nilable(String)) } + attr_reader :source_flow_type + end + class NetworkDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :addenda + end + sig { returns(T.nilable(Ach)) } + attr_reader :ach + sig { returns(String) } + attr_reader :type + end + class ReversalDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :deadline + sig { returns(T.nilable(String)) } + attr_reader :restricted_reason + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(String)) } + # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + attr_reader :failure_code + sig { returns(T.nilable(String)) } + # The FinancialAccount that received the funds. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(InitiatingPaymentMethodDetails) } + # Attribute for field initiating_payment_method_details + attr_reader :initiating_payment_method_details + sig { returns(LinkedFlows) } + # Attribute for field linked_flows + attr_reader :linked_flows + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The rails used to send the funds. + attr_reader :network + sig { returns(T.nilable(NetworkDetails)) } + # Details specific to the money movement rails. + attr_reader :network_details + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(ReversalDetails)) } + # Details describing when a ReceivedCredit may be reversed. + attr_reader :reversal_details + sig { returns(String) } + # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/received_debit.rbi b/rbi/stripe/resources/treasury/received_debit.rbi new file mode 100644 index 000000000..ea4bdbbb9 --- /dev/null +++ b/rbi/stripe/resources/treasury/received_debit.rbi @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + class ReceivedDebit < APIResource + class InitiatingPaymentMethodDetails < Stripe::StripeObject + class BillingDetails < Stripe::StripeObject + class Address < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :city + sig { returns(T.nilable(String)) } + attr_reader :country + sig { returns(T.nilable(String)) } + attr_reader :line1 + sig { returns(T.nilable(String)) } + attr_reader :line2 + sig { returns(T.nilable(String)) } + attr_reader :postal_code + sig { returns(T.nilable(String)) } + attr_reader :state + end + sig { returns(Address) } + attr_reader :address + sig { returns(T.nilable(String)) } + attr_reader :email + sig { returns(T.nilable(String)) } + attr_reader :name + end + class FinancialAccount < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :network + end + class UsBankAccount < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :bank_name + sig { returns(T.nilable(String)) } + attr_reader :last4 + sig { returns(T.nilable(String)) } + attr_reader :routing_number + end + sig { returns(String) } + attr_reader :balance + sig { returns(BillingDetails) } + attr_reader :billing_details + sig { returns(FinancialAccount) } + attr_reader :financial_account + sig { returns(String) } + attr_reader :issuing_card + sig { returns(String) } + attr_reader :type + sig { returns(UsBankAccount) } + attr_reader :us_bank_account + end + class LinkedFlows < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :debit_reversal + sig { returns(T.nilable(String)) } + attr_reader :inbound_transfer + sig { returns(T.nilable(String)) } + attr_reader :issuing_authorization + sig { returns(T.nilable(String)) } + attr_reader :issuing_transaction + sig { returns(T.nilable(String)) } + attr_reader :payout + sig { returns(T.nilable(String)) } + attr_reader :received_credit_capital_withholding + end + class NetworkDetails < Stripe::StripeObject + class Ach < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :addenda + end + sig { returns(T.nilable(Ach)) } + attr_reader :ach + sig { returns(String) } + attr_reader :type + end + class ReversalDetails < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :deadline + sig { returns(T.nilable(String)) } + attr_reader :restricted_reason + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(String)) } + # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + attr_reader :failure_code + sig { returns(T.nilable(String)) } + # The FinancialAccount that funds were pulled from. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + attr_reader :hosted_regulatory_receipt_url + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(InitiatingPaymentMethodDetails) } + # Attribute for field initiating_payment_method_details + attr_reader :initiating_payment_method_details + sig { returns(LinkedFlows) } + # Attribute for field linked_flows + attr_reader :linked_flows + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # The network used for the ReceivedDebit. + attr_reader :network + sig { returns(T.nilable(NetworkDetails)) } + # Details specific to the money movement rails. + attr_reader :network_details + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(ReversalDetails)) } + # Details describing when a ReceivedDebit might be reversed. + attr_reader :reversal_details + sig { returns(String) } + # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + attr_reader :status + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + attr_reader :transaction + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/transaction.rbi b/rbi/stripe/resources/treasury/transaction.rbi new file mode 100644 index 000000000..4cc2ac3dd --- /dev/null +++ b/rbi/stripe/resources/treasury/transaction.rbi @@ -0,0 +1,89 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + class Transaction < APIResource + class BalanceImpact < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :cash + sig { returns(Integer) } + attr_reader :inbound_pending + sig { returns(Integer) } + attr_reader :outbound_pending + end + class FlowDetails < Stripe::StripeObject + sig { returns(Stripe::Treasury::CreditReversal) } + attr_reader :credit_reversal + sig { returns(Stripe::Treasury::DebitReversal) } + attr_reader :debit_reversal + sig { returns(Stripe::Treasury::InboundTransfer) } + attr_reader :inbound_transfer + sig { returns(Stripe::Issuing::Authorization) } + attr_reader :issuing_authorization + sig { returns(Stripe::Treasury::OutboundPayment) } + attr_reader :outbound_payment + sig { returns(Stripe::Treasury::OutboundTransfer) } + attr_reader :outbound_transfer + sig { returns(Stripe::Treasury::ReceivedCredit) } + attr_reader :received_credit + sig { returns(Stripe::Treasury::ReceivedDebit) } + attr_reader :received_debit + sig { returns(String) } + attr_reader :type + end + class StatusTransitions < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :posted_at + sig { returns(T.nilable(Integer)) } + attr_reader :void_at + end + sig { returns(Integer) } + # Amount (in cents) transferred. + attr_reader :amount + sig { returns(BalanceImpact) } + # Change to a FinancialAccount's balance + attr_reader :balance_impact + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(T.nilable(Stripe::ListObject)) } + # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + attr_reader :entries + sig { returns(String) } + # The FinancialAccount associated with this object. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # ID of the flow that created the Transaction. + attr_reader :flow + sig { returns(T.nilable(FlowDetails)) } + # Details of the flow that created the Transaction. + attr_reader :flow_details + sig { returns(String) } + # Type of the flow that created the Transaction. + attr_reader :flow_type + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # Status of the Transaction. + attr_reader :status + sig { returns(StatusTransitions) } + # Attribute for field status_transitions + attr_reader :status_transitions + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/transaction_entry.rbi b/rbi/stripe/resources/treasury/transaction_entry.rbi new file mode 100644 index 000000000..4e0bf72b9 --- /dev/null +++ b/rbi/stripe/resources/treasury/transaction_entry.rbi @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Treasury + # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + class TransactionEntry < APIResource + class BalanceImpact < Stripe::StripeObject + sig { returns(Integer) } + attr_reader :cash + sig { returns(Integer) } + attr_reader :inbound_pending + sig { returns(Integer) } + attr_reader :outbound_pending + end + class FlowDetails < Stripe::StripeObject + sig { returns(Stripe::Treasury::CreditReversal) } + attr_reader :credit_reversal + sig { returns(Stripe::Treasury::DebitReversal) } + attr_reader :debit_reversal + sig { returns(Stripe::Treasury::InboundTransfer) } + attr_reader :inbound_transfer + sig { returns(Stripe::Issuing::Authorization) } + attr_reader :issuing_authorization + sig { returns(Stripe::Treasury::OutboundPayment) } + attr_reader :outbound_payment + sig { returns(Stripe::Treasury::OutboundTransfer) } + attr_reader :outbound_transfer + sig { returns(Stripe::Treasury::ReceivedCredit) } + attr_reader :received_credit + sig { returns(Stripe::Treasury::ReceivedDebit) } + attr_reader :received_debit + sig { returns(String) } + attr_reader :type + end + sig { returns(BalanceImpact) } + # Change to a FinancialAccount's balance + attr_reader :balance_impact + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(Integer) } + # When the TransactionEntry will impact the FinancialAccount's balance. + attr_reader :effective_at + sig { returns(String) } + # The FinancialAccount associated with this object. + attr_reader :financial_account + sig { returns(T.nilable(String)) } + # Token of the flow associated with the TransactionEntry. + attr_reader :flow + sig { returns(T.nilable(FlowDetails)) } + # Details of the flow associated with the TransactionEntry. + attr_reader :flow_details + sig { returns(String) } + # Type of the flow associated with the TransactionEntry. + attr_reader :flow_type + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. + attr_reader :transaction + sig { returns(String) } + # The specific money movement that generated the TransactionEntry. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/usage_record.rbi b/rbi/stripe/resources/usage_record.rbi new file mode 100644 index 000000000..c107a0489 --- /dev/null +++ b/rbi/stripe/resources/usage_record.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Usage records allow you to report customer usage and metrics to Stripe for + # metered billing of subscription prices. + # + # Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) + # + # This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). + class UsageRecord < APIResource + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # The usage quantity for the specified date. + attr_reader :quantity + sig { returns(String) } + # The ID of the subscription item this usage record contains data for. + attr_reader :subscription_item + sig { returns(Integer) } + # The timestamp when this usage occurred. + attr_reader :timestamp + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/usage_record_summary.rbi b/rbi/stripe/resources/usage_record_summary.rbi new file mode 100644 index 000000000..cb23d81e8 --- /dev/null +++ b/rbi/stripe/resources/usage_record_summary.rbi @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. + class UsageRecordSummary < StripeObject + class Period < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :end + sig { returns(T.nilable(Integer)) } + attr_reader :start + end + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # The invoice in which this usage period has been billed for. + attr_reader :invoice + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Period) } + # Attribute for field period + attr_reader :period + sig { returns(String) } + # The ID of the subscription item this summary is describing. + attr_reader :subscription_item + sig { returns(Integer) } + # The total usage within this usage period. + attr_reader :total_usage + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/meter_event.rbi b/rbi/stripe/resources/v2/billing/meter_event.rbi new file mode 100644 index 000000000..0bee702b4 --- /dev/null +++ b/rbi/stripe/resources/v2/billing/meter_event.rbi @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Billing + # Fix me empty_doc_string. + class MeterEvent < APIResource + sig { returns(String) } + # The creation time of this meter event. + attr_reader :created + sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + sig { returns(String) } + # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. + attr_reader :identifier + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + sig { returns(T::Hash[String, String]) } + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about the payload. + attr_reader :payload + sig { returns(String) } + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + attr_reader :timestamp + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi new file mode 100644 index 000000000..d71e5730e --- /dev/null +++ b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Billing + class MeterEventAdjustment < APIResource + class Cancel < Stripe::StripeObject + sig { returns(String) } + attr_reader :identifier + end + sig { returns(Cancel) } + # Specifies which event to cancel. + attr_reader :cancel + sig { returns(String) } + # The time the adjustment was created. + attr_reader :created + sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_reader :event_name + sig { returns(String) } + # The unique id of this meter event adjustment. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + sig { returns(String) } + # Open Enum. The meter event adjustment’s status. + attr_reader :status + sig { returns(String) } + # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_reader :type + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/meter_event_session.rbi b/rbi/stripe/resources/v2/billing/meter_event_session.rbi new file mode 100644 index 000000000..5b0fc9c85 --- /dev/null +++ b/rbi/stripe/resources/v2/billing/meter_event_session.rbi @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Billing + class MeterEventSession < APIResource + sig { returns(String) } + # The authentication token for this session. Use this token when calling the + # high-throughput meter event API. + attr_reader :authentication_token + sig { returns(String) } + # The creation time of this session. + attr_reader :created + sig { returns(String) } + # The time at which this session will expire. + attr_reader :expires_at + sig { returns(String) } + # The unique id of this auth session. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi new file mode 100644 index 000000000..9f02e2366 --- /dev/null +++ b/rbi/stripe/resources/v2/event.rbi @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + class Event < APIResource + class Reason < Stripe::StripeObject + class Request < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :idempotency_key + end + sig { returns(String) } + attr_reader :type + sig { returns(T.nilable(Request)) } + attr_reader :request + end + sig { returns(T.nilable(String)) } + # Authentication context needed to fetch the event or related object. + attr_reader :context + sig { returns(String) } + # Time at which the object was created. + attr_reader :created + sig { returns(String) } + # Unique identifier for the event. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + sig { returns(T.nilable(Reason)) } + # Reason for the event. + attr_reader :reason + sig { returns(String) } + # The type of the event. + attr_reader :type + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi new file mode 100644 index 000000000..f3901fed1 --- /dev/null +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -0,0 +1,82 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + class EventDestination < APIResource + class StatusDetails < Stripe::StripeObject + class Disabled < Stripe::StripeObject + sig { returns(String) } + attr_reader :reason + end + sig { returns(T.nilable(Disabled)) } + attr_reader :disabled + end + class AmazonEventbridge < Stripe::StripeObject + sig { returns(String) } + attr_reader :aws_account_id + sig { returns(String) } + attr_reader :aws_event_source_arn + sig { returns(String) } + attr_reader :aws_event_source_status + end + class WebhookEndpoint < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :signing_secret + sig { returns(T.nilable(String)) } + attr_reader :url + end + sig { returns(String) } + # Time at which the object was created. + attr_reader :created + sig { returns(String) } + # An optional description of what the event destination is used for. + attr_reader :description + sig { returns(T::Array[String]) } + # The list of events to enable for this endpoint. + attr_reader :enabled_events + sig { returns(String) } + # Payload type of events being subscribed to. + attr_reader :event_payload + sig { returns(T.nilable(T::Array[String])) } + # Where events should be routed from. + attr_reader :events_from + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T.nilable(T::Hash[String, String])) } + # Metadata. + attr_reader :metadata + sig { returns(String) } + # Event destination name. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + sig { returns(T.nilable(String)) } + # If using the snapshot event payload, the API version events are rendered as. + attr_reader :snapshot_api_version + sig { returns(String) } + # Status. It can be set to either enabled or disabled. + attr_reader :status + sig { returns(T.nilable(StatusDetails)) } + # Additional information about event destination status. + attr_reader :status_details + sig { returns(String) } + # Event destination type. + attr_reader :type + sig { returns(String) } + # Time at which the object was last updated. + attr_reader :updated + sig { returns(T.nilable(AmazonEventbridge)) } + # Amazon EventBridge configuration. + attr_reader :amazon_eventbridge + sig { returns(T.nilable(WebhookEndpoint)) } + # Webhook endpoint configuration. + attr_reader :webhook_endpoint + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/webhook_endpoint.rbi b/rbi/stripe/resources/webhook_endpoint.rbi new file mode 100644 index 000000000..25b9a953e --- /dev/null +++ b/rbi/stripe/resources/webhook_endpoint.rbi @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be + # notified about events that happen in your Stripe account or connected + # accounts. + # + # Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + # + # Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) + class WebhookEndpoint < APIResource + sig { returns(T.nilable(String)) } + # The API version events are rendered as for this webhook endpoint. + attr_reader :api_version + sig { returns(T.nilable(String)) } + # The ID of the associated Connect application. + attr_reader :application + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(T.nilable(String)) } + # An optional description of what the webhook is used for. + attr_reader :description + sig { returns(T::Array[String]) } + # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + attr_reader :enabled_events + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. + attr_reader :secret + sig { returns(String) } + # The status of the webhook. It can be `enabled` or `disabled`. + attr_reader :status + sig { returns(String) } + # The URL of the webhook endpoint. + attr_reader :url + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file From 8a3d93da27cf304dc67a32f9d5573090a77bfbea Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 01:00:52 -0500 Subject: [PATCH 02/10] Manual changes, lint, rubocop, amount --- .rubocop.yml | 4 ++++ lib/stripe/resources/v2/amount.rb | 9 +++++++++ rbi/stripe/resources/v2/amount.rbi | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 lib/stripe/resources/v2/amount.rb create mode 100644 rbi/stripe/resources/v2/amount.rbi diff --git a/.rubocop.yml b/.rubocop.yml index 755642edd..0ec0fe3e4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -66,6 +66,10 @@ Metrics/ParameterLists: - "lib/stripe/api_operations/request.rb" - "lib/stripe/stripe_object.rb" +Naming/VariableNumber: + # We use a variety of variable number syntaxes + Enabled: false + Style/AccessModifierDeclarations: EnforcedStyle: inline diff --git a/lib/stripe/resources/v2/amount.rb b/lib/stripe/resources/v2/amount.rb new file mode 100644 index 000000000..357bf0593 --- /dev/null +++ b/lib/stripe/resources/v2/amount.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Stripe + module V2 + class Amount + attr_reader :value, :currency + end + end +end diff --git a/rbi/stripe/resources/v2/amount.rbi b/rbi/stripe/resources/v2/amount.rbi new file mode 100644 index 000000000..fafe14e68 --- /dev/null +++ b/rbi/stripe/resources/v2/amount.rbi @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Stripe + module V2 + class Amount + sig { returns(Integer) } + attr_reader :value + sig {returns(String)} + attr_reader :currency + end + end +end From fe9be4c7fea392d2fdb57f6a8410196b55d0b143 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 16:28:04 -0500 Subject: [PATCH 03/10] fix accessors --- lib/stripe/resources/bank_account.rb | 6 ++++-- lib/stripe/stripe_object.rb | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 0f7b1d901..4c508e3ea 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -94,10 +94,12 @@ def self.verify(customer, id, params = {}, opts = {}) end def resource_url - if respond_to?(:customer) + if !customer.nil? "#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}" - elsif respond_to?(:account) + elsif !account.nil? "#{Account.resource_url}/#{CGI.escape(account)}/external_accounts/#{CGI.escape(id)}" + else + raise InvalidRequestError, "Could not determine which URL to request: [account, customer] field(s) are all null" end end diff --git a/lib/stripe/stripe_object.rb b/lib/stripe/stripe_object.rb index c73f8ee50..a6070fa46 100644 --- a/lib/stripe/stripe_object.rb +++ b/lib/stripe/stripe_object.rb @@ -83,6 +83,7 @@ def initialize(id = nil, opts = {}, api_mode = :v1, requestor = nil) @unsaved_values = Set.new @transient_values = Set.new @values[:id] = id if id + @id = id @last_response = nil @requestor = requestor || APIRequestor.active_requestor end @@ -369,6 +370,10 @@ class << self; self; end define_method(:"#{k}?") { @values[k] } if [FalseClass, TrueClass].include?(values[k].class) end end + + keys.each do |k| + instance_variable_set(:"@#{k}", values[k]) + end end # Disabling the cop because it's confused by the fact that the methods are From 10c6cc82bc8db735a0a2e8daeb1bac15e3856fc1 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 17:35:52 -0500 Subject: [PATCH 04/10] Undo list param change and add extra fields to pass sorbet tc --- lib/stripe/object_types.rb | 10 + lib/stripe/resources.rb | 10 + lib/stripe/resources/account.rb | 4 +- lib/stripe/resources/account_notice.rb | 4 +- lib/stripe/resources/apple_pay_domain.rb | 9 +- lib/stripe/resources/application.rb | 20 ++ lib/stripe/resources/application_fee.rb | 4 +- lib/stripe/resources/apps/secret.rb | 4 +- lib/stripe/resources/balance_transaction.rb | 4 +- lib/stripe/resources/bank_account.rb | 8 +- lib/stripe/resources/billing/alert.rb | 4 +- .../resources/billing/alert_triggered.rb | 26 ++ .../billing/credit_balance_transaction.rb | 4 +- lib/stripe/resources/billing/credit_grant.rb | 4 +- lib/stripe/resources/billing/meter.rb | 4 +- .../resources/billing/meter_error_report.rb | 44 +++ .../resources/billing_portal/configuration.rb | 4 +- .../resources/capital/financing_offer.rb | 4 +- .../capital/financing_transaction.rb | 4 +- lib/stripe/resources/card.rb | 2 +- lib/stripe/resources/charge.rb | 4 +- lib/stripe/resources/checkout/session.rb | 4 +- lib/stripe/resources/climate/order.rb | 4 +- lib/stripe/resources/climate/product.rb | 4 +- lib/stripe/resources/climate/supplier.rb | 4 +- .../resources/connect_collection_transfer.rb | 24 ++ lib/stripe/resources/country_spec.rb | 4 +- lib/stripe/resources/coupon.rb | 4 +- lib/stripe/resources/credit_note.rb | 4 +- lib/stripe/resources/customer.rb | 4 +- lib/stripe/resources/dispute.rb | 4 +- .../entitlements/active_entitlement.rb | 4 +- .../active_entitlement_summary.rb | 23 ++ lib/stripe/resources/entitlements/feature.rb | 4 +- lib/stripe/resources/event.rb | 4 +- lib/stripe/resources/exchange_rate.rb | 4 +- lib/stripe/resources/file.rb | 4 +- lib/stripe/resources/file_link.rb | 4 +- .../financial_connections/account.rb | 4 +- .../financial_connections/institution.rb | 4 +- .../financial_connections/transaction.rb | 4 +- lib/stripe/resources/forwarding/request.rb | 4 +- lib/stripe/resources/gift_cards/card.rb | 4 +- .../resources/gift_cards/transaction.rb | 4 +- .../resources/identity/verification_report.rb | 4 +- .../identity/verification_session.rb | 4 +- lib/stripe/resources/invoice.rb | 4 +- lib/stripe/resources/invoice_item.rb | 4 +- .../resources/invoice_rendering_template.rb | 4 +- lib/stripe/resources/issuing/authorization.rb | 4 +- lib/stripe/resources/issuing/card.rb | 4 +- lib/stripe/resources/issuing/cardholder.rb | 4 +- .../issuing/credit_underwriting_record.rb | 4 +- lib/stripe/resources/issuing/dispute.rb | 4 +- .../issuing/dispute_settlement_detail.rb | 4 +- .../issuing/fraud_liability_debit.rb | 4 +- .../issuing/personalization_design.rb | 4 +- .../resources/issuing/physical_bundle.rb | 4 +- lib/stripe/resources/issuing/settlement.rb | 49 ++++ lib/stripe/resources/issuing/token.rb | 4 +- lib/stripe/resources/issuing/transaction.rb | 4 +- lib/stripe/resources/margin.rb | 4 +- lib/stripe/resources/order.rb | 4 +- .../resources/payment_attempt_record.rb | 4 +- lib/stripe/resources/payment_intent.rb | 4 +- lib/stripe/resources/payment_link.rb | 4 +- lib/stripe/resources/payment_method.rb | 4 +- .../resources/payment_method_configuration.rb | 4 +- lib/stripe/resources/payment_method_domain.rb | 4 +- lib/stripe/resources/payout.rb | 4 +- lib/stripe/resources/plan.rb | 4 +- lib/stripe/resources/price.rb | 4 +- lib/stripe/resources/product.rb | 4 +- lib/stripe/resources/promotion_code.rb | 4 +- lib/stripe/resources/quote.rb | 4 +- lib/stripe/resources/quote_line.rb | 136 +++++++++ .../resources/radar/early_fraud_warning.rb | 4 +- lib/stripe/resources/radar/value_list.rb | 4 +- lib/stripe/resources/radar/value_list_item.rb | 4 +- lib/stripe/resources/refund.rb | 4 +- lib/stripe/resources/reporting/report_run.rb | 4 +- lib/stripe/resources/reporting/report_type.rb | 4 +- lib/stripe/resources/reserve_transaction.rb | 22 ++ lib/stripe/resources/review.rb | 4 +- lib/stripe/resources/setup_attempt.rb | 4 +- lib/stripe/resources/setup_intent.rb | 4 +- lib/stripe/resources/shipping_rate.rb | 4 +- .../resources/sigma/scheduled_query_run.rb | 4 +- .../resources/source_mandate_notification.rb | 59 ++++ lib/stripe/resources/subscription.rb | 4 +- lib/stripe/resources/subscription_item.rb | 4 +- lib/stripe/resources/subscription_schedule.rb | 4 +- lib/stripe/resources/tax/form.rb | 4 +- lib/stripe/resources/tax/registration.rb | 4 +- lib/stripe/resources/tax_code.rb | 4 +- .../resources/tax_deducted_at_source.rb | 22 ++ lib/stripe/resources/tax_id.rb | 4 +- lib/stripe/resources/tax_rate.rb | 4 +- .../resources/terminal/configuration.rb | 4 +- lib/stripe/resources/terminal/location.rb | 4 +- lib/stripe/resources/terminal/reader.rb | 4 +- .../resources/test_helpers/test_clock.rb | 4 +- lib/stripe/resources/topup.rb | 4 +- lib/stripe/resources/transfer.rb | 4 +- .../resources/treasury/credit_reversal.rb | 4 +- .../resources/treasury/debit_reversal.rb | 4 +- .../resources/treasury/financial_account.rb | 4 +- .../resources/treasury/inbound_transfer.rb | 4 +- .../resources/treasury/outbound_payment.rb | 4 +- .../resources/treasury/outbound_transfer.rb | 4 +- .../resources/treasury/received_credit.rb | 4 +- .../resources/treasury/received_debit.rb | 4 +- lib/stripe/resources/treasury/transaction.rb | 4 +- .../resources/treasury/transaction_entry.rb | 4 +- lib/stripe/resources/webhook_endpoint.rb | 9 +- rbi/stripe/resources/account.rbi | 1 + rbi/stripe/resources/account_link.rbi | 1 + rbi/stripe/resources/account_notice.rbi | 1 + rbi/stripe/resources/account_session.rbi | 1 + rbi/stripe/resources/apple_pay_domain.rbi | 1 + rbi/stripe/resources/application.rbi | 20 ++ rbi/stripe/resources/application_fee.rbi | 1 + .../resources/application_fee_refund.rbi | 1 + rbi/stripe/resources/apps/secret.rbi | 1 + rbi/stripe/resources/balance.rbi | 1 + rbi/stripe/resources/balance_transaction.rbi | 1 + rbi/stripe/resources/bank_account.rbi | 1 + rbi/stripe/resources/billing/alert.rbi | 1 + .../resources/billing/alert_triggered.rbi | 28 ++ .../billing/credit_balance_summary.rbi | 1 + .../billing/credit_balance_transaction.rbi | 1 + rbi/stripe/resources/billing/credit_grant.rbi | 1 + rbi/stripe/resources/billing/meter.rbi | 1 + .../resources/billing/meter_error_report.rbi | 61 ++++ rbi/stripe/resources/billing/meter_event.rbi | 1 + .../billing/meter_event_adjustment.rbi | 1 + .../resources/billing/meter_event_summary.rbi | 1 + .../billing_portal/configuration.rbi | 1 + .../resources/billing_portal/session.rbi | 1 + rbi/stripe/resources/capability.rbi | 1 + .../resources/capital/financing_offer.rbi | 1 + .../resources/capital/financing_summary.rbi | 1 + .../capital/financing_transaction.rbi | 1 + rbi/stripe/resources/card.rbi | 1 + rbi/stripe/resources/cash_balance.rbi | 1 + rbi/stripe/resources/charge.rbi | 1 + rbi/stripe/resources/checkout/session.rbi | 1 + rbi/stripe/resources/climate/order.rbi | 1 + rbi/stripe/resources/climate/product.rbi | 1 + rbi/stripe/resources/climate/supplier.rbi | 1 + rbi/stripe/resources/confirmation_token.rbi | 1 + .../resources/connect_collection_transfer.rbi | 26 ++ rbi/stripe/resources/country_spec.rbi | 1 + rbi/stripe/resources/coupon.rbi | 1 + rbi/stripe/resources/credit_note.rbi | 1 + .../resources/credit_note_line_item.rbi | 1 + rbi/stripe/resources/customer.rbi | 1 + .../customer_balance_transaction.rbi | 1 + .../customer_cash_balance_transaction.rbi | 1 + rbi/stripe/resources/customer_session.rbi | 1 + rbi/stripe/resources/discount.rbi | 1 + rbi/stripe/resources/dispute.rbi | 1 + .../entitlements/active_entitlement.rbi | 1 + .../active_entitlement_summary.rbi | 23 ++ rbi/stripe/resources/entitlements/feature.rbi | 1 + rbi/stripe/resources/ephemeral_key.rbi | 1 + rbi/stripe/resources/event.rbi | 1 + rbi/stripe/resources/exchange_rate.rbi | 1 + rbi/stripe/resources/file.rbi | 1 + rbi/stripe/resources/file_link.rbi | 1 + .../financial_connections/account.rbi | 1 + .../account_inferred_balance.rbi | 1 + .../financial_connections/account_owner.rbi | 1 + .../account_ownership.rbi | 1 + .../financial_connections/institution.rbi | 1 + .../financial_connections/session.rbi | 1 + .../financial_connections/transaction.rbi | 1 + rbi/stripe/resources/forwarding/request.rbi | 1 + rbi/stripe/resources/funding_instructions.rbi | 1 + rbi/stripe/resources/gift_cards/card.rbi | 1 + .../resources/gift_cards/transaction.rbi | 1 + .../identity/verification_report.rbi | 1 + .../identity/verification_session.rbi | 1 + rbi/stripe/resources/invoice.rbi | 1 + rbi/stripe/resources/invoice_item.rbi | 1 + rbi/stripe/resources/invoice_line_item.rbi | 1 + rbi/stripe/resources/invoice_payment.rbi | 1 + .../resources/invoice_rendering_template.rbi | 1 + .../resources/issuing/authorization.rbi | 1 + rbi/stripe/resources/issuing/card.rbi | 1 + rbi/stripe/resources/issuing/cardholder.rbi | 1 + .../issuing/credit_underwriting_record.rbi | 1 + rbi/stripe/resources/issuing/dispute.rbi | 1 + .../issuing/dispute_settlement_detail.rbi | 1 + .../issuing/fraud_liability_debit.rbi | 1 + .../issuing/personalization_design.rbi | 1 + .../resources/issuing/physical_bundle.rbi | 1 + rbi/stripe/resources/issuing/settlement.rbi | 62 ++++ rbi/stripe/resources/issuing/token.rbi | 1 + rbi/stripe/resources/issuing/transaction.rbi | 1 + rbi/stripe/resources/line_item.rbi | 1 + rbi/stripe/resources/login_link.rbi | 1 + rbi/stripe/resources/mandate.rbi | 1 + rbi/stripe/resources/margin.rbi | 1 + rbi/stripe/resources/order.rbi | 1 + .../resources/payment_attempt_record.rbi | 1 + rbi/stripe/resources/payment_intent.rbi | 1 + rbi/stripe/resources/payment_link.rbi | 1 + rbi/stripe/resources/payment_method.rbi | 1 + .../payment_method_configuration.rbi | 1 + .../resources/payment_method_domain.rbi | 1 + rbi/stripe/resources/payment_record.rbi | 1 + rbi/stripe/resources/payout.rbi | 1 + rbi/stripe/resources/person.rbi | 1 + rbi/stripe/resources/plan.rbi | 1 + rbi/stripe/resources/price.rbi | 1 + rbi/stripe/resources/product.rbi | 1 + rbi/stripe/resources/product_feature.rbi | 1 + rbi/stripe/resources/promotion_code.rbi | 1 + rbi/stripe/resources/quote.rbi | 1 + rbi/stripe/resources/quote_line.rbi | 267 ++++++++++++++++++ .../resources/quote_preview_invoice.rbi | 1 + .../quote_preview_subscription_schedule.rbi | 1 + .../resources/radar/early_fraud_warning.rbi | 1 + rbi/stripe/resources/radar/value_list.rbi | 1 + .../resources/radar/value_list_item.rbi | 1 + rbi/stripe/resources/refund.rbi | 1 + rbi/stripe/resources/reporting/report_run.rbi | 1 + .../resources/reporting/report_type.rbi | 1 + rbi/stripe/resources/reserve_transaction.rbi | 23 ++ rbi/stripe/resources/reversal.rbi | 1 + rbi/stripe/resources/review.rbi | 1 + rbi/stripe/resources/setup_attempt.rbi | 1 + rbi/stripe/resources/setup_intent.rbi | 1 + rbi/stripe/resources/shipping_rate.rbi | 1 + .../resources/sigma/scheduled_query_run.rbi | 1 + rbi/stripe/resources/source.rbi | 1 + .../resources/source_mandate_notification.rbi | 72 +++++ rbi/stripe/resources/source_transaction.rbi | 1 + rbi/stripe/resources/subscription.rbi | 1 + rbi/stripe/resources/subscription_item.rbi | 1 + .../resources/subscription_schedule.rbi | 1 + rbi/stripe/resources/tax/association.rbi | 1 + rbi/stripe/resources/tax/calculation.rbi | 1 + .../resources/tax/calculation_line_item.rbi | 1 + rbi/stripe/resources/tax/form.rbi | 1 + rbi/stripe/resources/tax/registration.rbi | 1 + rbi/stripe/resources/tax/settings.rbi | 1 + rbi/stripe/resources/tax/transaction.rbi | 1 + .../resources/tax/transaction_line_item.rbi | 1 + rbi/stripe/resources/tax_code.rbi | 1 + .../resources/tax_deducted_at_source.rbi | 23 ++ rbi/stripe/resources/tax_id.rbi | 1 + rbi/stripe/resources/tax_rate.rbi | 1 + .../resources/terminal/configuration.rbi | 1 + .../resources/terminal/connection_token.rbi | 1 + rbi/stripe/resources/terminal/location.rbi | 1 + rbi/stripe/resources/terminal/reader.rbi | 1 + .../terminal/reader_collected_data.rbi | 1 + .../resources/test_helpers/test_clock.rbi | 1 + rbi/stripe/resources/token.rbi | 1 + rbi/stripe/resources/topup.rbi | 1 + rbi/stripe/resources/transfer.rbi | 1 + .../resources/treasury/credit_reversal.rbi | 1 + .../resources/treasury/debit_reversal.rbi | 1 + .../resources/treasury/financial_account.rbi | 1 + .../treasury/financial_account_features.rbi | 1 + .../resources/treasury/inbound_transfer.rbi | 1 + .../resources/treasury/outbound_payment.rbi | 1 + .../resources/treasury/outbound_transfer.rbi | 1 + .../resources/treasury/received_credit.rbi | 1 + .../resources/treasury/received_debit.rbi | 1 + rbi/stripe/resources/treasury/transaction.rbi | 1 + .../resources/treasury/transaction_entry.rbi | 1 + rbi/stripe/resources/usage_record.rbi | 1 + rbi/stripe/resources/usage_record_summary.rbi | 1 + .../resources/v2/billing/meter_event.rbi | 1 + .../v2/billing/meter_event_adjustment.rbi | 1 + .../v2/billing/meter_event_session.rbi | 1 + rbi/stripe/resources/v2/event.rbi | 1 + rbi/stripe/resources/v2/event_destination.rbi | 1 + rbi/stripe/resources/webhook_endpoint.rbi | 1 + 282 files changed, 1423 insertions(+), 208 deletions(-) create mode 100644 lib/stripe/resources/application.rb create mode 100644 lib/stripe/resources/billing/alert_triggered.rb create mode 100644 lib/stripe/resources/billing/meter_error_report.rb create mode 100644 lib/stripe/resources/connect_collection_transfer.rb create mode 100644 lib/stripe/resources/entitlements/active_entitlement_summary.rb create mode 100644 lib/stripe/resources/issuing/settlement.rb create mode 100644 lib/stripe/resources/quote_line.rb create mode 100644 lib/stripe/resources/reserve_transaction.rb create mode 100644 lib/stripe/resources/source_mandate_notification.rb create mode 100644 lib/stripe/resources/tax_deducted_at_source.rb create mode 100644 rbi/stripe/resources/application.rbi create mode 100644 rbi/stripe/resources/billing/alert_triggered.rbi create mode 100644 rbi/stripe/resources/billing/meter_error_report.rbi create mode 100644 rbi/stripe/resources/connect_collection_transfer.rbi create mode 100644 rbi/stripe/resources/entitlements/active_entitlement_summary.rbi create mode 100644 rbi/stripe/resources/issuing/settlement.rbi create mode 100644 rbi/stripe/resources/quote_line.rbi create mode 100644 rbi/stripe/resources/reserve_transaction.rbi create mode 100644 rbi/stripe/resources/source_mandate_notification.rbi create mode 100644 rbi/stripe/resources/tax_deducted_at_source.rbi diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index fcc6fc283..a63797f9c 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -17,6 +17,7 @@ def self.object_names_to_classes AccountNotice.object_name => AccountNotice, AccountSession.object_name => AccountSession, ApplePayDomain.object_name => ApplePayDomain, + Application.object_name => Application, ApplicationFee.object_name => ApplicationFee, ApplicationFeeRefund.object_name => ApplicationFeeRefund, Apps::Secret.object_name => Apps::Secret, @@ -24,10 +25,12 @@ def self.object_names_to_classes BalanceTransaction.object_name => BalanceTransaction, BankAccount.object_name => BankAccount, Billing::Alert.object_name => Billing::Alert, + Billing::AlertTriggered.object_name => Billing::AlertTriggered, Billing::CreditBalanceSummary.object_name => Billing::CreditBalanceSummary, Billing::CreditBalanceTransaction.object_name => Billing::CreditBalanceTransaction, Billing::CreditGrant.object_name => Billing::CreditGrant, Billing::Meter.object_name => Billing::Meter, + Billing::MeterErrorReport.object_name => Billing::MeterErrorReport, Billing::MeterEvent.object_name => Billing::MeterEvent, Billing::MeterEventAdjustment.object_name => Billing::MeterEventAdjustment, Billing::MeterEventSummary.object_name => Billing::MeterEventSummary, @@ -45,6 +48,7 @@ def self.object_names_to_classes Climate::Product.object_name => Climate::Product, Climate::Supplier.object_name => Climate::Supplier, ConfirmationToken.object_name => ConfirmationToken, + ConnectCollectionTransfer.object_name => ConnectCollectionTransfer, CountrySpec.object_name => CountrySpec, Coupon.object_name => Coupon, CreditNote.object_name => CreditNote, @@ -56,6 +60,7 @@ def self.object_names_to_classes Discount.object_name => Discount, Dispute.object_name => Dispute, Entitlements::ActiveEntitlement.object_name => Entitlements::ActiveEntitlement, + Entitlements::ActiveEntitlementSummary.object_name => Entitlements::ActiveEntitlementSummary, Entitlements::Feature.object_name => Entitlements::Feature, EphemeralKey.object_name => EphemeralKey, Event.object_name => Event, @@ -90,6 +95,7 @@ def self.object_names_to_classes Issuing::FraudLiabilityDebit.object_name => Issuing::FraudLiabilityDebit, Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign, Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle, + Issuing::Settlement.object_name => Issuing::Settlement, Issuing::Token.object_name => Issuing::Token, Issuing::Transaction.object_name => Issuing::Transaction, LineItem.object_name => LineItem, @@ -112,6 +118,7 @@ def self.object_names_to_classes ProductFeature.object_name => ProductFeature, PromotionCode.object_name => PromotionCode, Quote.object_name => Quote, + QuoteLine.object_name => QuoteLine, QuotePreviewInvoice.object_name => QuotePreviewInvoice, QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule, Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning, @@ -120,6 +127,7 @@ def self.object_names_to_classes Refund.object_name => Refund, Reporting::ReportRun.object_name => Reporting::ReportRun, Reporting::ReportType.object_name => Reporting::ReportType, + ReserveTransaction.object_name => ReserveTransaction, Reversal.object_name => Reversal, Review.object_name => Review, SetupAttempt.object_name => SetupAttempt, @@ -127,6 +135,7 @@ def self.object_names_to_classes ShippingRate.object_name => ShippingRate, Sigma::ScheduledQueryRun.object_name => Sigma::ScheduledQueryRun, Source.object_name => Source, + SourceMandateNotification.object_name => SourceMandateNotification, SourceTransaction.object_name => SourceTransaction, Subscription.object_name => Subscription, SubscriptionItem.object_name => SubscriptionItem, @@ -140,6 +149,7 @@ def self.object_names_to_classes Tax::Transaction.object_name => Tax::Transaction, Tax::TransactionLineItem.object_name => Tax::TransactionLineItem, TaxCode.object_name => TaxCode, + TaxDeductedAtSource.object_name => TaxDeductedAtSource, TaxId.object_name => TaxId, TaxRate.object_name => TaxRate, Terminal::Configuration.object_name => Terminal::Configuration, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index 58a12bcb8..b66848372 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -6,6 +6,7 @@ require "stripe/resources/account_notice" require "stripe/resources/account_session" require "stripe/resources/apple_pay_domain" +require "stripe/resources/application" require "stripe/resources/application_fee" require "stripe/resources/application_fee_refund" require "stripe/resources/apps/secret" @@ -13,10 +14,12 @@ require "stripe/resources/balance_transaction" require "stripe/resources/bank_account" require "stripe/resources/billing/alert" +require "stripe/resources/billing/alert_triggered" require "stripe/resources/billing/credit_balance_summary" require "stripe/resources/billing/credit_balance_transaction" require "stripe/resources/billing/credit_grant" require "stripe/resources/billing/meter" +require "stripe/resources/billing/meter_error_report" require "stripe/resources/billing/meter_event" require "stripe/resources/billing/meter_event_adjustment" require "stripe/resources/billing/meter_event_summary" @@ -34,6 +37,7 @@ require "stripe/resources/climate/product" require "stripe/resources/climate/supplier" require "stripe/resources/confirmation_token" +require "stripe/resources/connect_collection_transfer" require "stripe/resources/country_spec" require "stripe/resources/coupon" require "stripe/resources/credit_note" @@ -45,6 +49,7 @@ require "stripe/resources/discount" require "stripe/resources/dispute" require "stripe/resources/entitlements/active_entitlement" +require "stripe/resources/entitlements/active_entitlement_summary" require "stripe/resources/entitlements/feature" require "stripe/resources/ephemeral_key" require "stripe/resources/event" @@ -78,6 +83,7 @@ require "stripe/resources/issuing/fraud_liability_debit" require "stripe/resources/issuing/personalization_design" require "stripe/resources/issuing/physical_bundle" +require "stripe/resources/issuing/settlement" require "stripe/resources/issuing/token" require "stripe/resources/issuing/transaction" require "stripe/resources/line_item" @@ -100,6 +106,7 @@ require "stripe/resources/product_feature" require "stripe/resources/promotion_code" require "stripe/resources/quote" +require "stripe/resources/quote_line" require "stripe/resources/quote_preview_invoice" require "stripe/resources/quote_preview_subscription_schedule" require "stripe/resources/radar/early_fraud_warning" @@ -108,6 +115,7 @@ require "stripe/resources/refund" require "stripe/resources/reporting/report_run" require "stripe/resources/reporting/report_type" +require "stripe/resources/reserve_transaction" require "stripe/resources/reversal" require "stripe/resources/review" require "stripe/resources/setup_attempt" @@ -115,6 +123,7 @@ require "stripe/resources/shipping_rate" require "stripe/resources/sigma/scheduled_query_run" require "stripe/resources/source" +require "stripe/resources/source_mandate_notification" require "stripe/resources/source_transaction" require "stripe/resources/subscription" require "stripe/resources/subscription_item" @@ -128,6 +137,7 @@ require "stripe/resources/tax/transaction" require "stripe/resources/tax/transaction_line_item" require "stripe/resources/tax_code" +require "stripe/resources/tax_deducted_at_source" require "stripe/resources/tax_id" require "stripe/resources/tax_rate" require "stripe/resources/terminal/configuration" diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 959879456..0312b7dad 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -307,8 +307,8 @@ def delete(params = {}, opts = {}) end # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/accounts", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: opts) end # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. diff --git a/lib/stripe/resources/account_notice.rb b/lib/stripe/resources/account_notice.rb index 2b7b0324d..fe9061dd7 100644 --- a/lib/stripe/resources/account_notice.rb +++ b/lib/stripe/resources/account_notice.rb @@ -43,8 +43,8 @@ class LinkedObjects < Stripe::StripeObject attr_reader :sent_at # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/account_notices", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/account_notices", params: filters, opts: opts) end # Updates an AccountNotice object. diff --git a/lib/stripe/resources/apple_pay_domain.rb b/lib/stripe/resources/apple_pay_domain.rb index 269825d33..72e69dc1a 100644 --- a/lib/stripe/resources/apple_pay_domain.rb +++ b/lib/stripe/resources/apple_pay_domain.rb @@ -57,8 +57,13 @@ def delete(params = {}, opts = {}) end # List apple pay domains. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/apple_pay/domains", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object( + method: :get, + path: "/v1/apple_pay/domains", + params: filters, + opts: opts + ) end def self.resource_url diff --git a/lib/stripe/resources/application.rb b/lib/stripe/resources/application.rb new file mode 100644 index 000000000..1e97598e2 --- /dev/null +++ b/lib/stripe/resources/application.rb @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class Application < APIResource + OBJECT_NAME = "application" + def self.object_name + "application" + end + + # Unique identifier for the object. + attr_reader :id + # The name of the application. + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Always true for a deleted object + attr_reader :deleted + end +end diff --git a/lib/stripe/resources/application_fee.rb b/lib/stripe/resources/application_fee.rb index cce00b42c..1aeb9b833 100644 --- a/lib/stripe/resources/application_fee.rb +++ b/lib/stripe/resources/application_fee.rb @@ -48,8 +48,8 @@ class FeeSource < Stripe::StripeObject attr_reader :refunds # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/application_fees", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb index d0e99da1c..22c3c44fe 100644 --- a/lib/stripe/resources/apps/secret.rb +++ b/lib/stripe/resources/apps/secret.rb @@ -69,8 +69,8 @@ def self.find(params = {}, opts = {}) end # List all secrets stored on the given scope. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/apps/secrets", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/apps/secrets", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb index 1d17dca28..61b0751cb 100644 --- a/lib/stripe/resources/balance_transaction.rb +++ b/lib/stripe/resources/balance_transaction.rb @@ -51,11 +51,11 @@ class FeeDetail < Stripe::StripeObject # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. # # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/balance_transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 4c508e3ea..3b578f13b 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -94,12 +94,10 @@ def self.verify(customer, id, params = {}, opts = {}) end def resource_url - if !customer.nil? + if respond_to?(:customer) "#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}" - elsif !account.nil? + elsif respond_to?(:account) "#{Account.resource_url}/#{CGI.escape(account)}/external_accounts/#{CGI.escape(id)}" - else - raise InvalidRequestError, "Could not determine which URL to request: [account, customer] field(s) are all null" end end @@ -139,7 +137,7 @@ def delete(params = {}, opts = {}) ) end - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) raise NotImplementedError, "Bank accounts cannot be listed without a customer ID or an " \ "account ID. List bank accounts using " \ diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb index f16c7e13c..e2e9a8b67 100644 --- a/lib/stripe/resources/billing/alert.rb +++ b/lib/stripe/resources/billing/alert.rb @@ -100,8 +100,8 @@ def self.deactivate(id, params = {}, opts = {}) end # Lists billing active and inactive alerts - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/alerts", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/alerts", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/billing/alert_triggered.rb b/lib/stripe/resources/billing/alert_triggered.rb new file mode 100644 index 000000000..e89df9388 --- /dev/null +++ b/lib/stripe/resources/billing/alert_triggered.rb @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + class AlertTriggered < APIResource + OBJECT_NAME = "billing.alert_triggered" + def self.object_name + "billing.alert_triggered" + end + + # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + attr_reader :alert + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # ID of customer for which the alert triggered + attr_reader :customer + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The value triggering the alert + attr_reader :value + end + end +end diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb index 949d9da70..70be62345 100644 --- a/lib/stripe/resources/billing/credit_balance_transaction.rb +++ b/lib/stripe/resources/billing/credit_balance_transaction.rb @@ -57,11 +57,11 @@ class CreditsApplied < Stripe::StripeObject attr_reader :type # Retrieve a list of credit balance transactions - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_balance_transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index 94ad3c026..137d2edfe 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -91,11 +91,11 @@ def self.expire(id, params = {}, opts = {}) end # Retrieve a list of credit grants. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_grants", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb index dfd6ec90b..7301d77c4 100644 --- a/lib/stripe/resources/billing/meter.rb +++ b/lib/stripe/resources/billing/meter.rb @@ -89,8 +89,8 @@ def self.deactivate(id, params = {}, opts = {}) end # Retrieve a list of billing meters. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/meters", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts) end # Reactivates a billing meter diff --git a/lib/stripe/resources/billing/meter_error_report.rb b/lib/stripe/resources/billing/meter_error_report.rb new file mode 100644 index 000000000..3523ed1bb --- /dev/null +++ b/lib/stripe/resources/billing/meter_error_report.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Billing + class MeterErrorReport < APIResource + OBJECT_NAME = "billing.meter_error_report" + def self.object_name + "billing.meter_error_report" + end + + class Reason < Stripe::StripeObject + class ErrorType < Stripe::StripeObject + class SampleError < Stripe::StripeObject + class ApiRequest < Stripe::StripeObject + attr_reader :id, :idempotency_key + end + attr_reader :api_request, :error_message + end + attr_reader :sample_errors + end + attr_reader :error_count, :error_types + end + + class RelatedObject < Stripe::StripeObject + attr_reader :id, :object, :url + end + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Attribute for field reason + attr_reader :reason + # The related objects about the error + attr_reader :related_object + # Summary of invalid events + attr_reader :summary + # Time when validation ended. Measured in seconds since the Unix epoch + attr_reader :validation_end + # Time when validation started. Measured in seconds since the Unix epoch + attr_reader :validation_start + end + end +end diff --git a/lib/stripe/resources/billing_portal/configuration.rb b/lib/stripe/resources/billing_portal/configuration.rb index 12edd1dcf..486fdcd23 100644 --- a/lib/stripe/resources/billing_portal/configuration.rb +++ b/lib/stripe/resources/billing_portal/configuration.rb @@ -95,11 +95,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of configurations that describe the functionality of the customer portal. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing_portal/configurations", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/capital/financing_offer.rb b/lib/stripe/resources/capital/financing_offer.rb index adb7b8118..28c5dee5c 100644 --- a/lib/stripe/resources/capital/financing_offer.rb +++ b/lib/stripe/resources/capital/financing_offer.rb @@ -59,11 +59,11 @@ class OfferedTerms < Stripe::StripeObject attr_reader :type # Retrieves the financing offers available for Connected accounts that belong to your platform. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/capital/financing_offers", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/capital/financing_transaction.rb b/lib/stripe/resources/capital/financing_transaction.rb index f9ba76518..77a156cc4 100644 --- a/lib/stripe/resources/capital/financing_transaction.rb +++ b/lib/stripe/resources/capital/financing_transaction.rb @@ -43,11 +43,11 @@ class Transaction < Stripe::StripeObject # Returns a list of financing transactions. The transactions are returned in sorted order, # with the most recent transactions appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/capital/financing_transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb index f0ad7c9aa..4904e6874 100644 --- a/lib/stripe/resources/card.rb +++ b/lib/stripe/resources/card.rb @@ -130,7 +130,7 @@ def delete(params = {}, opts = {}) ) end - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) raise NotImplementedError, "Cards cannot be listed without a customer ID or an account " \ "ID. List cards using `Customer.list_sources(" \ diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index d2da0bb0b..594278b8c 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -503,8 +503,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/charges", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/charges", params: filters, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index dc8954831..df33c82b8 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -554,11 +554,11 @@ def self.expire(session, params = {}, opts = {}) end # Returns a list of Checkout Sessions. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/checkout/sessions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb index a317a59e6..3962cba81 100644 --- a/lib/stripe/resources/climate/order.rb +++ b/lib/stripe/resources/climate/order.rb @@ -104,8 +104,8 @@ def self.create(params = {}, opts = {}) # Lists all Climate order objects. The orders are returned sorted by creation date, with the # most recently created orders appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/climate/orders", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/climate/orders", params: filters, opts: opts) end # Updates the specified order by setting the values of the parameters passed. diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb index 069f9a25a..e47af3f01 100644 --- a/lib/stripe/resources/climate/product.rb +++ b/lib/stripe/resources/climate/product.rb @@ -38,11 +38,11 @@ class CurrentPricesPerMetricTon < Stripe::StripeObject attr_reader :suppliers # Lists all available Climate product objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/climate/products", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/climate/supplier.rb b/lib/stripe/resources/climate/supplier.rb index ad1dabd05..f48fdb10b 100644 --- a/lib/stripe/resources/climate/supplier.rb +++ b/lib/stripe/resources/climate/supplier.rb @@ -31,11 +31,11 @@ class Location < Stripe::StripeObject attr_reader :removal_pathway # Lists all available Climate supplier objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/climate/suppliers", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/connect_collection_transfer.rb b/lib/stripe/resources/connect_collection_transfer.rb new file mode 100644 index 000000000..3e0d4fc7a --- /dev/null +++ b/lib/stripe/resources/connect_collection_transfer.rb @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class ConnectCollectionTransfer < APIResource + OBJECT_NAME = "connect_collection_transfer" + def self.object_name + "connect_collection_transfer" + end + + # Amount transferred, in cents (or local equivalent). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the account that funds are being collected for. + attr_reader :destination + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end diff --git a/lib/stripe/resources/country_spec.rb b/lib/stripe/resources/country_spec.rb index fefd143d7..9b4aebadd 100644 --- a/lib/stripe/resources/country_spec.rb +++ b/lib/stripe/resources/country_spec.rb @@ -44,8 +44,8 @@ class Individual < Stripe::StripeObject attr_reader :verification_fields # Lists all Country Spec objects available in the API. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/country_specs", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/country_specs", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/coupon.rb b/lib/stripe/resources/coupon.rb index c118e8acd..bef8d6eda 100644 --- a/lib/stripe/resources/coupon.rb +++ b/lib/stripe/resources/coupon.rb @@ -88,8 +88,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your coupons. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/coupons", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/coupons", params: filters, opts: opts) end # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index 3e8d3c5c1..b2d1067b0 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -125,8 +125,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of credit notes. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/credit_notes", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/credit_notes", params: filters, opts: opts) end # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb index d9f1a16e7..5cb98dde4 100644 --- a/lib/stripe/resources/customer.rb +++ b/lib/stripe/resources/customer.rb @@ -185,8 +185,8 @@ def self.delete_discount(customer, params = {}, opts = {}) end # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/customers", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/customers", params: filters, opts: opts) end # Returns a list of PaymentMethods for a given Customer diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb index 276746eca..ad46a11ba 100644 --- a/lib/stripe/resources/dispute.rb +++ b/lib/stripe/resources/dispute.rb @@ -129,8 +129,8 @@ def self.close(dispute, params = {}, opts = {}) end # Returns a list of your disputes. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/disputes", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/disputes", params: filters, opts: opts) end # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. diff --git a/lib/stripe/resources/entitlements/active_entitlement.rb b/lib/stripe/resources/entitlements/active_entitlement.rb index c8627ecd6..76dd2e814 100644 --- a/lib/stripe/resources/entitlements/active_entitlement.rb +++ b/lib/stripe/resources/entitlements/active_entitlement.rb @@ -24,11 +24,11 @@ def self.object_name attr_reader :object # Retrieve a list of active entitlements for a customer - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/entitlements/active_entitlements", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/entitlements/active_entitlement_summary.rb b/lib/stripe/resources/entitlements/active_entitlement_summary.rb new file mode 100644 index 000000000..7fd0fa7fc --- /dev/null +++ b/lib/stripe/resources/entitlements/active_entitlement_summary.rb @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Entitlements + # A summary of a customer's active entitlements. + class ActiveEntitlementSummary < APIResource + OBJECT_NAME = "entitlements.active_entitlement_summary" + def self.object_name + "entitlements.active_entitlement_summary" + end + + # The customer that is entitled to this feature. + attr_reader :customer + # The list of entitlements this customer has. + attr_reader :entitlements + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end diff --git a/lib/stripe/resources/entitlements/feature.rb b/lib/stripe/resources/entitlements/feature.rb index 4238b0361..818f93eda 100644 --- a/lib/stripe/resources/entitlements/feature.rb +++ b/lib/stripe/resources/entitlements/feature.rb @@ -41,11 +41,11 @@ def self.create(params = {}, opts = {}) end # Retrieve a list of features - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/entitlements/features", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index 3034e487c..881dd9a7e 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -85,8 +85,8 @@ class Request < Stripe::StripeObject attr_reader :type # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/events", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/exchange_rate.rb b/lib/stripe/resources/exchange_rate.rb index 66185d82b..cf00aa263 100644 --- a/lib/stripe/resources/exchange_rate.rb +++ b/lib/stripe/resources/exchange_rate.rb @@ -44,8 +44,8 @@ def self.object_name attr_reader :rates # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/exchange_rates", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/exchange_rates", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index 4992db6c8..0f490f61a 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -61,8 +61,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/files", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/files", params: filters, opts: opts) end # This resource can have two different object names. In latter API diff --git a/lib/stripe/resources/file_link.rb b/lib/stripe/resources/file_link.rb index 5e689f3fc..52b89a9c1 100644 --- a/lib/stripe/resources/file_link.rb +++ b/lib/stripe/resources/file_link.rb @@ -40,8 +40,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of file links. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/file_links", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/file_links", params: filters, opts: opts) end # Updates an existing file link object. Expired links can no longer be updated. diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index 3b0608f18..ecd842c08 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -120,11 +120,11 @@ def self.disconnect(account, params = {}, opts = {}) end # Returns a list of Financial Connections Account objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/accounts", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/financial_connections/institution.rb b/lib/stripe/resources/financial_connections/institution.rb index 5432ec320..8bf8f0b03 100644 --- a/lib/stripe/resources/financial_connections/institution.rb +++ b/lib/stripe/resources/financial_connections/institution.rb @@ -48,11 +48,11 @@ class Transactions < Stripe::StripeObject attr_reader :url # Returns a list of Financial Connections Institution objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/institutions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb index bebac6d4f..1bf15f3cb 100644 --- a/lib/stripe/resources/financial_connections/transaction.rb +++ b/lib/stripe/resources/financial_connections/transaction.rb @@ -41,11 +41,11 @@ class StatusTransitions < Stripe::StripeObject attr_reader :updated # Returns a list of Financial Connections Transaction objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/forwarding/request.rb b/lib/stripe/resources/forwarding/request.rb index da71c975f..c66e94fdc 100644 --- a/lib/stripe/resources/forwarding/request.rb +++ b/lib/stripe/resources/forwarding/request.rb @@ -79,11 +79,11 @@ def self.create(params = {}, opts = {}) end # Lists all ForwardingRequest objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/forwarding/requests", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/gift_cards/card.rb b/lib/stripe/resources/gift_cards/card.rb index 6de6e9c2f..b8fd8e4cd 100644 --- a/lib/stripe/resources/gift_cards/card.rb +++ b/lib/stripe/resources/gift_cards/card.rb @@ -63,11 +63,11 @@ def self.create(params = {}, opts = {}) end # List gift cards for an account - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/gift_cards/cards", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/gift_cards/transaction.rb b/lib/stripe/resources/gift_cards/transaction.rb index ffde53df6..88b538ce2 100644 --- a/lib/stripe/resources/gift_cards/transaction.rb +++ b/lib/stripe/resources/gift_cards/transaction.rb @@ -109,11 +109,11 @@ def self.create(params = {}, opts = {}) end # List gift card transactions for a gift card - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/gift_cards/transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/identity/verification_report.rb b/lib/stripe/resources/identity/verification_report.rb index f87515e2a..37f4a6a73 100644 --- a/lib/stripe/resources/identity/verification_report.rb +++ b/lib/stripe/resources/identity/verification_report.rb @@ -115,11 +115,11 @@ class Error < Stripe::StripeObject attr_reader :verification_session # List all verification reports. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/identity/verification_reports", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index 6d0563ca6..dc8ce7ece 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -141,11 +141,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of VerificationSessions - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/identity/verification_sessions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index e75d379b4..6d6a7f62b 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -549,8 +549,8 @@ def self.finalize_invoice(invoice, params = {}, opts = {}) end # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/invoices", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/invoices", params: filters, opts: opts) end # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index 58644091f..156c10f52 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -104,8 +104,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/invoiceitems", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/invoiceitems", params: filters, opts: opts) end # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb index 45c782694..9f033c1a3 100644 --- a/lib/stripe/resources/invoice_rendering_template.rb +++ b/lib/stripe/resources/invoice_rendering_template.rb @@ -50,11 +50,11 @@ def self.archive(template, params = {}, opts = {}) end # List all templates, ordered by creation date, with the most recently created template appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/invoice_rendering_templates", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index 6a2e4e343..cc78edd17 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -202,11 +202,11 @@ class << self end # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/authorizations", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb index 131622a7c..aa8cd2bd0 100644 --- a/lib/stripe/resources/issuing/card.rb +++ b/lib/stripe/resources/issuing/card.rb @@ -106,8 +106,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/issuing/cards", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/issuing/cards", params: filters, opts: opts) end # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb index 45edbae33..ac9a686d2 100644 --- a/lib/stripe/resources/issuing/cardholder.rb +++ b/lib/stripe/resources/issuing/cardholder.rb @@ -103,11 +103,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/cardholders", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/credit_underwriting_record.rb b/lib/stripe/resources/issuing/credit_underwriting_record.rb index 3b6c879fe..d5f51d632 100644 --- a/lib/stripe/resources/issuing/credit_underwriting_record.rb +++ b/lib/stripe/resources/issuing/credit_underwriting_record.rb @@ -112,11 +112,11 @@ def self.create_from_proactive_review(params = {}, opts = {}) end # Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/credit_underwriting_records", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb index a5fbf3a88..fc2cf4e2f 100644 --- a/lib/stripe/resources/issuing/dispute.rb +++ b/lib/stripe/resources/issuing/dispute.rb @@ -92,11 +92,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/disputes", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/dispute_settlement_detail.rb b/lib/stripe/resources/issuing/dispute_settlement_detail.rb index 0ca55005e..c94ed93cd 100644 --- a/lib/stripe/resources/issuing/dispute_settlement_detail.rb +++ b/lib/stripe/resources/issuing/dispute_settlement_detail.rb @@ -36,11 +36,11 @@ def self.object_name attr_reader :settlement # Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/dispute_settlement_details", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/fraud_liability_debit.rb b/lib/stripe/resources/issuing/fraud_liability_debit.rb index b5671ba94..19872b9fb 100644 --- a/lib/stripe/resources/issuing/fraud_liability_debit.rb +++ b/lib/stripe/resources/issuing/fraud_liability_debit.rb @@ -30,11 +30,11 @@ def self.object_name attr_reader :object # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/fraud_liability_debits", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/personalization_design.rb b/lib/stripe/resources/issuing/personalization_design.rb index 8a31ff369..06387b16d 100644 --- a/lib/stripe/resources/issuing/personalization_design.rb +++ b/lib/stripe/resources/issuing/personalization_design.rb @@ -63,11 +63,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/personalization_designs", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/physical_bundle.rb b/lib/stripe/resources/issuing/physical_bundle.rb index 109e85fee..2914698ba 100644 --- a/lib/stripe/resources/issuing/physical_bundle.rb +++ b/lib/stripe/resources/issuing/physical_bundle.rb @@ -31,11 +31,11 @@ class Features < Stripe::StripeObject attr_reader :type # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/physical_bundles", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/issuing/settlement.rb b/lib/stripe/resources/issuing/settlement.rb new file mode 100644 index 000000000..c0c91a1df --- /dev/null +++ b/lib/stripe/resources/issuing/settlement.rb @@ -0,0 +1,49 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + class Settlement < APIResource + OBJECT_NAME = "issuing.settlement" + def self.object_name + "issuing.settlement" + end + + # The Bank Identification Number reflecting this settlement record. + attr_reader :bin + # The date that the transactions are cleared and posted to user's accounts. + attr_reader :clearing_date + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Unique identifier for the object. + attr_reader :id + # The total interchange received as reimbursement for the transactions. + attr_reader :interchange_fees + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # The total net amount required to settle with the network. + attr_reader :net_total + # The card network for this settlement report. One of ["visa", "maestro"] + attr_reader :network + # The total amount of fees owed to the network. + attr_reader :network_fees + # The Settlement Identification Number assigned by the network. + attr_reader :network_settlement_identifier + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # One of `international` or `uk_national_net`. + attr_reader :settlement_service + # The current processing status of this settlement. + attr_reader :status + # The total number of transactions reflected in this settlement. + attr_reader :transaction_count + # The total transaction amount reflected in this settlement. + attr_reader :transaction_volume + end + end +end diff --git a/lib/stripe/resources/issuing/token.rb b/lib/stripe/resources/issuing/token.rb index d89046e8f..22d116c94 100644 --- a/lib/stripe/resources/issuing/token.rb +++ b/lib/stripe/resources/issuing/token.rb @@ -60,8 +60,8 @@ class CardholderAddress < Stripe::StripeObject attr_reader :wallet_provider # Lists all Issuing Token objects for a given card. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts) end # Attempts to update the specified Issuing Token object to the status specified. diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index 8ddcce5f5..8ff91af19 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -124,11 +124,11 @@ class Treasury < Stripe::StripeObject attr_reader :wallet # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/margin.rb b/lib/stripe/resources/margin.rb index 15c09ab57..3724a5b7d 100644 --- a/lib/stripe/resources/margin.rb +++ b/lib/stripe/resources/margin.rb @@ -39,8 +39,8 @@ def self.create(params = {}, opts = {}) end # Retrieve a list of your margins. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/margins", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/margins", params: filters, opts: opts) end # Update the specified margin object. Certain fields of the margin object are not editable. diff --git a/lib/stripe/resources/order.rb b/lib/stripe/resources/order.rb index c7d2404af..f1a953c69 100644 --- a/lib/stripe/resources/order.rb +++ b/lib/stripe/resources/order.rb @@ -243,8 +243,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/orders", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/orders", params: filters, opts: opts) end # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/payment_attempt_record.rb b/lib/stripe/resources/payment_attempt_record.rb index 4775e7559..7b5bf5829 100644 --- a/lib/stripe/resources/payment_attempt_record.rb +++ b/lib/stripe/resources/payment_attempt_record.rb @@ -88,11 +88,11 @@ class Address < Stripe::StripeObject attr_reader :shipping_details # List all the Payment Attempt Records attached to the specified Payment Record. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_attempt_records", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index cbc3af903..9416abf90 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -909,8 +909,8 @@ def self.increment_authorization(intent, params = {}, opts = {}) end # Returns a list of PaymentIntents. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_intents", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_intents", params: filters, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/payment_link.rb b/lib/stripe/resources/payment_link.rb index 95b093c64..b01ba8e39 100644 --- a/lib/stripe/resources/payment_link.rb +++ b/lib/stripe/resources/payment_link.rb @@ -221,8 +221,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your payment links. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_links", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_links", params: filters, opts: opts) end # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb index 3d80244d2..0cf025150 100644 --- a/lib/stripe/resources/payment_method.rb +++ b/lib/stripe/resources/payment_method.rb @@ -457,8 +457,8 @@ def self.detach(payment_method, params = {}, opts = {}) end # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_methods", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_methods", params: filters, opts: opts) end # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index c8d6adebb..fece78419 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -467,11 +467,11 @@ def self.create(params = {}, opts = {}) end # List payment method configurations - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_method_configurations", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb index 6df3a2298..5e16e18fd 100644 --- a/lib/stripe/resources/payment_method_domain.rb +++ b/lib/stripe/resources/payment_method_domain.rb @@ -84,11 +84,11 @@ def self.create(params = {}, opts = {}) end # Lists the details of existing payment method domains. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_method_domains", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb index 4ca0a8aa9..dc6220842 100644 --- a/lib/stripe/resources/payout.rb +++ b/lib/stripe/resources/payout.rb @@ -106,8 +106,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payouts", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payouts", params: filters, opts: opts) end # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb index 5a511b26c..c55fdceb1 100644 --- a/lib/stripe/resources/plan.rb +++ b/lib/stripe/resources/plan.rb @@ -99,8 +99,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your plans. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/plans", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/plans", params: filters, opts: opts) end # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb index c6b771cd6..2a10a85bd 100644 --- a/lib/stripe/resources/price.rb +++ b/lib/stripe/resources/price.rb @@ -102,8 +102,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/prices", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/prices", params: filters, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb index 49e7400a6..85379e215 100644 --- a/lib/stripe/resources/product.rb +++ b/lib/stripe/resources/product.rb @@ -111,8 +111,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/products", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/products", params: filters, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/promotion_code.rb b/lib/stripe/resources/promotion_code.rb index 0a4059b60..1339b7eb5 100644 --- a/lib/stripe/resources/promotion_code.rb +++ b/lib/stripe/resources/promotion_code.rb @@ -55,8 +55,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your promotion codes. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/promotion_codes", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/promotion_codes", params: filters, opts: opts) end # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index 644f26439..a0844890d 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -336,8 +336,8 @@ def self.finalize_quote(quote, params = {}, opts = {}) end # Returns a list of your quotes. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/quotes", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/quotes", params: filters, opts: opts) end # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. diff --git a/lib/stripe/resources/quote_line.rb b/lib/stripe/resources/quote_line.rb new file mode 100644 index 000000000..16cd4815c --- /dev/null +++ b/lib/stripe/resources/quote_line.rb @@ -0,0 +1,136 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A quote line defines a set of changes, in the order provided, that will be applied upon quote acceptance. + class QuoteLine < APIResource + OBJECT_NAME = "quote_line" + def self.object_name + "quote_line" + end + + class Action < Stripe::StripeObject + class AddDiscount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :type + end + attr_reader :coupon, :discount, :discount_end, :index, :promotion_code + end + + class AddItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class Trial < Stripe::StripeObject + attr_reader :converts_to, :type + end + attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial + end + + class RemoveDiscount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class RemoveItem < Stripe::StripeObject + attr_reader :price + end + + class SetDiscount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class SetItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :timestamp, :type + end + attr_reader :coupon, :discount, :discount_end, :promotion_code + end + + class Trial < Stripe::StripeObject + attr_reader :converts_to, :type + end + attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial + end + attr_reader :add_discount, :add_item, :add_metadata, :remove_discount, :remove_item, :remove_metadata, :set_discounts, :set_items, :set_metadata, :type + end + + class AppliesTo < Stripe::StripeObject + attr_reader :new_reference, :subscription_schedule, :type + end + + class CancelSubscriptionSchedule < Stripe::StripeObject + attr_reader :cancel_at, :invoice_now, :prorate + end + + class EndsAt < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :discount + end + + class Duration < Stripe::StripeObject + attr_reader :interval, :interval_count + end + attr_reader :computed, :discount_end, :duration, :timestamp, :type + end + + class SetPauseCollection < Stripe::StripeObject + class Set < Stripe::StripeObject + attr_reader :behavior + end + attr_reader :set, :type + end + + class StartsAt < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + attr_reader :discount + end + + class LineEndsAt < Stripe::StripeObject + attr_reader :id + end + attr_reader :computed, :discount_end, :line_ends_at, :timestamp, :type + end + + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + attr_reader :prorate_up_front + end + attr_reader :end_behavior + end + # A list of items the customer is being quoted for. + attr_reader :actions + # Details to identify the subscription schedule the quote line applies to. + attr_reader :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + attr_reader :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + attr_reader :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + attr_reader :ends_at + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + attr_reader :proration_behavior + # Details to modify the pause_collection behavior of the subscription schedule. + attr_reader :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + attr_reader :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_reader :starts_at + # Settings related to subscription trials. + attr_reader :trial_settings + end +end diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb index d8179b712..04f91876b 100644 --- a/lib/stripe/resources/radar/early_fraud_warning.rb +++ b/lib/stripe/resources/radar/early_fraud_warning.rb @@ -33,11 +33,11 @@ def self.object_name attr_reader :payment_intent # Returns a list of early fraud warnings. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/early_fraud_warnings", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb index b3d851434..bfe3302be 100644 --- a/lib/stripe/resources/radar/value_list.rb +++ b/lib/stripe/resources/radar/value_list.rb @@ -71,11 +71,11 @@ def delete(params = {}, opts = {}) end # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_lists", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb index ad0f3f050..e2871b7b3 100644 --- a/lib/stripe/resources/radar/value_list_item.rb +++ b/lib/stripe/resources/radar/value_list_item.rb @@ -64,11 +64,11 @@ def delete(params = {}, opts = {}) end # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_list_items", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index 0690f677d..8e5e64856 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -187,8 +187,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/refunds", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/refunds", params: filters, opts: opts) end # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. diff --git a/lib/stripe/resources/reporting/report_run.rb b/lib/stripe/resources/reporting/report_run.rb index 2107ed9cc..b69c60b29 100644 --- a/lib/stripe/resources/reporting/report_run.rb +++ b/lib/stripe/resources/reporting/report_run.rb @@ -60,11 +60,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Report Runs, with the most recent appearing first. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/reporting/report_runs", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/reporting/report_type.rb b/lib/stripe/resources/reporting/report_type.rb index 66015ce00..65e2a9de2 100644 --- a/lib/stripe/resources/reporting/report_type.rb +++ b/lib/stripe/resources/reporting/report_type.rb @@ -39,11 +39,11 @@ def self.object_name attr_reader :version # Returns a full list of Report Types. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/reporting/report_types", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/reserve_transaction.rb b/lib/stripe/resources/reserve_transaction.rb new file mode 100644 index 000000000..f12d71eaa --- /dev/null +++ b/lib/stripe/resources/reserve_transaction.rb @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class ReserveTransaction < APIResource + OBJECT_NAME = "reserve_transaction" + def self.object_name + "reserve_transaction" + end + + # Attribute for field amount + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end diff --git a/lib/stripe/resources/review.rb b/lib/stripe/resources/review.rb index 4f31f8ed4..239cad633 100644 --- a/lib/stripe/resources/review.rb +++ b/lib/stripe/resources/review.rb @@ -71,8 +71,8 @@ def self.approve(review, params = {}, opts = {}) end # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/reviews", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/reviews", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index f8a41b44e..e3a12d879 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -116,8 +116,8 @@ class SetupError < Stripe::StripeObject attr_reader :usage # Returns a list of SetupAttempts that associate with a provided SetupIntent. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/setup_attempts", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/setup_attempts", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index a2ad9482c..b0b0b978a 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -266,8 +266,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of SetupIntents. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/setup_intents", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/setup_intents", params: filters, opts: opts) end # Updates a SetupIntent object. diff --git a/lib/stripe/resources/shipping_rate.rb b/lib/stripe/resources/shipping_rate.rb index 9d0b485b8..d3d42f641 100644 --- a/lib/stripe/resources/shipping_rate.rb +++ b/lib/stripe/resources/shipping_rate.rb @@ -62,8 +62,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your shipping rates. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/shipping_rates", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/shipping_rates", params: filters, opts: opts) end # Updates an existing shipping rate object. diff --git a/lib/stripe/resources/sigma/scheduled_query_run.rb b/lib/stripe/resources/sigma/scheduled_query_run.rb index 83c734101..08cdacc6a 100644 --- a/lib/stripe/resources/sigma/scheduled_query_run.rb +++ b/lib/stripe/resources/sigma/scheduled_query_run.rb @@ -42,11 +42,11 @@ class Error < Stripe::StripeObject attr_reader :title # Returns a list of scheduled query runs. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/sigma/scheduled_query_runs", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/source_mandate_notification.rb b/lib/stripe/resources/source_mandate_notification.rb new file mode 100644 index 000000000..ae94aec0c --- /dev/null +++ b/lib/stripe/resources/source_mandate_notification.rb @@ -0,0 +1,59 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # Source mandate notifications should be created when a notification related to + # a source mandate must be sent to the payer. They will trigger a webhook or + # deliver an email to the customer. + class SourceMandateNotification < APIResource + OBJECT_NAME = "source_mandate_notification" + def self.object_name + "source_mandate_notification" + end + + class AcssDebit < Stripe::StripeObject + attr_reader :statement_descriptor + end + + class BacsDebit < Stripe::StripeObject + attr_reader :last4 + end + + class SepaDebit < Stripe::StripeObject + attr_reader :creditor_identifier, :last4, :mandate_reference + end + # Attribute for field acss_debit + attr_reader :acss_debit + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + attr_reader :amount + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Unique identifier for the object. + attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + attr_reader :reason + # Attribute for field sepa_debit + attr_reader :sepa_debit + # `Source` objects allow you to accept a variety of payment methods. They + # represent a customer's payment instrument, and can be used with the Stripe API + # just like a `Card` object: once chargeable, they can be charged, or can be + # attached to customers. + # + # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + # This newer API provides access to our latest features and payment method types. + # + # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + attr_reader :source + # The status of the mandate notification. Valid statuses are `pending` or `submitted`. + attr_reader :status + # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + attr_reader :type + end +end diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index 106a43153..c5403ff03 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -290,8 +290,8 @@ def self.delete_discount(subscription_exposed_id, params = {}, opts = {}) end # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/subscriptions", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/subscriptions", params: filters, opts: opts) end # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. diff --git a/lib/stripe/resources/subscription_item.rb b/lib/stripe/resources/subscription_item.rb index 96550033b..053b0f159 100644 --- a/lib/stripe/resources/subscription_item.rb +++ b/lib/stripe/resources/subscription_item.rb @@ -98,11 +98,11 @@ def delete(params = {}, opts = {}) end # Returns a list of your subscription items for a given subscription. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/subscription_items", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 31eda4bf1..753fafee2 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -219,11 +219,11 @@ def self.create(params = {}, opts = {}) end # Retrieves the list of your subscription schedules. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/subscription_schedules", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/tax/form.rb b/lib/stripe/resources/tax/form.rb index 937d783cf..e519aff9f 100644 --- a/lib/stripe/resources/tax/form.rb +++ b/lib/stripe/resources/tax/form.rb @@ -90,8 +90,8 @@ class Us1099Nec < Stripe::StripeObject attr_reader :us_1099_nec # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax/forms", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts) end # Download the PDF for a tax form. diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb index 78d8d48e2..08d2e9534 100644 --- a/lib/stripe/resources/tax/registration.rb +++ b/lib/stripe/resources/tax/registration.rb @@ -408,11 +408,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Tax Registration objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/tax/registrations", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/tax_code.rb b/lib/stripe/resources/tax_code.rb index acec3dcb6..f8fcee6f6 100644 --- a/lib/stripe/resources/tax_code.rb +++ b/lib/stripe/resources/tax_code.rb @@ -21,8 +21,8 @@ def self.object_name attr_reader :object # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_codes", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_codes", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/tax_deducted_at_source.rb b/lib/stripe/resources/tax_deducted_at_source.rb new file mode 100644 index 000000000..a504a626b --- /dev/null +++ b/lib/stripe/resources/tax_deducted_at_source.rb @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + class TaxDeductedAtSource < APIResource + OBJECT_NAME = "tax_deducted_at_source" + def self.object_name + "tax_deducted_at_source" + end + + # Unique identifier for the object. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + attr_reader :period_end + # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + attr_reader :period_start + # The TAN that was supplied to Stripe when TDS was assessed + attr_reader :tax_deduction_account_number + end +end diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb index aef3c5fb6..20f1c29cc 100644 --- a/lib/stripe/resources/tax_id.rb +++ b/lib/stripe/resources/tax_id.rb @@ -72,8 +72,8 @@ def delete(params = {}, opts = {}) end # Returns a list of tax IDs. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_ids", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_ids", params: filters, opts: opts) end end end diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index c4365423f..6fbcbe304 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -63,8 +63,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_rates", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_rates", params: filters, opts: opts) end # Updates an existing tax rate. diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb index a98359d19..1788977a8 100644 --- a/lib/stripe/resources/terminal/configuration.rb +++ b/lib/stripe/resources/terminal/configuration.rb @@ -153,11 +153,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Configuration objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/configurations", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb index d5824c716..b6645ab85 100644 --- a/lib/stripe/resources/terminal/location.rb +++ b/lib/stripe/resources/terminal/location.rb @@ -69,11 +69,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Location objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/locations", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index ea7730fb1..c57b5f984 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -246,11 +246,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Reader objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/readers", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/test_helpers/test_clock.rb b/lib/stripe/resources/test_helpers/test_clock.rb index c020c4530..267261301 100644 --- a/lib/stripe/resources/test_helpers/test_clock.rb +++ b/lib/stripe/resources/test_helpers/test_clock.rb @@ -94,11 +94,11 @@ def delete(params = {}, opts = {}) end # Returns a list of your test clocks. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/test_helpers/test_clocks", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb index dd58dcb50..b3366fb3a 100644 --- a/lib/stripe/resources/topup.rb +++ b/lib/stripe/resources/topup.rb @@ -76,8 +76,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of top-ups. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/topups", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/topups", params: filters, opts: opts) end # Updates the metadata of a top-up. Other top-up details are not editable by design. diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb index 5940dc20c..2473544fa 100644 --- a/lib/stripe/resources/transfer.rb +++ b/lib/stripe/resources/transfer.rb @@ -66,8 +66,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/transfers", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/transfers", params: filters, opts: opts) end # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/lib/stripe/resources/treasury/credit_reversal.rb b/lib/stripe/resources/treasury/credit_reversal.rb index f0c09f07e..c16a48a7b 100644 --- a/lib/stripe/resources/treasury/credit_reversal.rb +++ b/lib/stripe/resources/treasury/credit_reversal.rb @@ -56,11 +56,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of CreditReversals. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/credit_reversals", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/debit_reversal.rb b/lib/stripe/resources/treasury/debit_reversal.rb index e1c82a58c..394f649e1 100644 --- a/lib/stripe/resources/treasury/debit_reversal.rb +++ b/lib/stripe/resources/treasury/debit_reversal.rb @@ -62,11 +62,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of DebitReversals. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/debit_reversals", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb index 18eabd667..9e1ba838a 100644 --- a/lib/stripe/resources/treasury/financial_account.rb +++ b/lib/stripe/resources/treasury/financial_account.rb @@ -83,11 +83,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of FinancialAccounts. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/financial_accounts", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/inbound_transfer.rb b/lib/stripe/resources/treasury/inbound_transfer.rb index 3f94429a5..8053b926c 100644 --- a/lib/stripe/resources/treasury/inbound_transfer.rb +++ b/lib/stripe/resources/treasury/inbound_transfer.rb @@ -112,11 +112,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of InboundTransfers sent from the specified FinancialAccount. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/inbound_transfers", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/outbound_payment.rb b/lib/stripe/resources/treasury/outbound_payment.rb index ab9dc82b2..9e62d2575 100644 --- a/lib/stripe/resources/treasury/outbound_payment.rb +++ b/lib/stripe/resources/treasury/outbound_payment.rb @@ -133,11 +133,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of OutboundPayments sent from the specified FinancialAccount. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_payments", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/outbound_transfer.rb b/lib/stripe/resources/treasury/outbound_transfer.rb index cc0f6a3bd..96bbc7d31 100644 --- a/lib/stripe/resources/treasury/outbound_transfer.rb +++ b/lib/stripe/resources/treasury/outbound_transfer.rb @@ -130,11 +130,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of OutboundTransfers sent from the specified FinancialAccount. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_transfers", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/received_credit.rb b/lib/stripe/resources/treasury/received_credit.rb index 99ff78eba..fe157d2c6 100644 --- a/lib/stripe/resources/treasury/received_credit.rb +++ b/lib/stripe/resources/treasury/received_credit.rb @@ -83,11 +83,11 @@ class ReversalDetails < Stripe::StripeObject attr_reader :transaction # Returns a list of ReceivedCredits. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/received_credits", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/received_debit.rb b/lib/stripe/resources/treasury/received_debit.rb index eaeb52fad..7fb18fa1a 100644 --- a/lib/stripe/resources/treasury/received_debit.rb +++ b/lib/stripe/resources/treasury/received_debit.rb @@ -80,11 +80,11 @@ class ReversalDetails < Stripe::StripeObject attr_reader :transaction # Returns a list of ReceivedDebits. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/received_debits", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/transaction.rb b/lib/stripe/resources/treasury/transaction.rb index 977072507..5ec9f7c4d 100644 --- a/lib/stripe/resources/treasury/transaction.rb +++ b/lib/stripe/resources/treasury/transaction.rb @@ -55,11 +55,11 @@ class StatusTransitions < Stripe::StripeObject attr_reader :status_transitions # Retrieves a list of Transaction objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/transactions", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/treasury/transaction_entry.rb b/lib/stripe/resources/treasury/transaction_entry.rb index 005e4ded9..a5d49a33c 100644 --- a/lib/stripe/resources/treasury/transaction_entry.rb +++ b/lib/stripe/resources/treasury/transaction_entry.rb @@ -47,11 +47,11 @@ class FlowDetails < Stripe::StripeObject attr_reader :type # Retrieves a list of TransactionEntry objects. - def self.list(params = {}, opts = {}) + def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/transaction_entries", - params: params, + params: filters, opts: opts ) end diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index dea3e91da..ae594fb04 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -78,8 +78,13 @@ def delete(params = {}, opts = {}) end # Returns a list of your webhook endpoints. - def self.list(params = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/webhook_endpoints", params: params, opts: opts) + def self.list(filters = {}, opts = {}) + request_stripe_object( + method: :get, + path: "/v1/webhook_endpoints", + params: filters, + opts: opts + ) end # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index b920a7f1d..2288425f5 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # This is an object representing a Stripe account. You can retrieve it to see # properties on the account like its current requirements or if the account is diff --git a/rbi/stripe/resources/account_link.rbi b/rbi/stripe/resources/account_link.rbi index 60e21281a..63551fb51 100644 --- a/rbi/stripe/resources/account_link.rbi +++ b/rbi/stripe/resources/account_link.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Account Links are the means by which a Connect platform grants a connected account permission to access # Stripe-hosted applications, such as Connect Onboarding. diff --git a/rbi/stripe/resources/account_notice.rbi b/rbi/stripe/resources/account_notice.rbi index 0c33d7771..430ba2ecb 100644 --- a/rbi/stripe/resources/account_notice.rbi +++ b/rbi/stripe/resources/account_notice.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself. # diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi index 33470f161..8010a1450 100644 --- a/rbi/stripe/resources/account_session.rbi +++ b/rbi/stripe/resources/account_session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. # diff --git a/rbi/stripe/resources/apple_pay_domain.rbi b/rbi/stripe/resources/apple_pay_domain.rbi index a4df7fa52..ccead41a3 100644 --- a/rbi/stripe/resources/apple_pay_domain.rbi +++ b/rbi/stripe/resources/apple_pay_domain.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Domains registered for Apple Pay on the Web class ApplePayDomain < APIResource diff --git a/rbi/stripe/resources/application.rbi b/rbi/stripe/resources/application.rbi new file mode 100644 index 000000000..8db61fc11 --- /dev/null +++ b/rbi/stripe/resources/application.rbi @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class Application < APIResource + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T.nilable(String)) } + # The name of the application. + attr_reader :name + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T::Boolean) } + # Always true for a deleted object + attr_reader :deleted + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee.rbi b/rbi/stripe/resources/application_fee.rbi index 11c48870c..f12fa1dcd 100644 --- a/rbi/stripe/resources/application_fee.rbi +++ b/rbi/stripe/resources/application_fee.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe class ApplicationFee < APIResource class FeeSource < Stripe::StripeObject diff --git a/rbi/stripe/resources/application_fee_refund.rbi b/rbi/stripe/resources/application_fee_refund.rbi index 5eeae0ea4..571351dfe 100644 --- a/rbi/stripe/resources/application_fee_refund.rbi +++ b/rbi/stripe/resources/application_fee_refund.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # `Application Fee Refund` objects allow you to refund an application fee that # has previously been created but not yet refunded. Funds will be refunded to diff --git a/rbi/stripe/resources/apps/secret.rbi b/rbi/stripe/resources/apps/secret.rbi index 7d79ca933..62bb75da3 100644 --- a/rbi/stripe/resources/apps/secret.rbi +++ b/rbi/stripe/resources/apps/secret.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Apps # Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. diff --git a/rbi/stripe/resources/balance.rbi b/rbi/stripe/resources/balance.rbi index 3dad535f2..aa4dfd063 100644 --- a/rbi/stripe/resources/balance.rbi +++ b/rbi/stripe/resources/balance.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # This is an object representing your Stripe balance. You can retrieve it to see # the balance currently on your Stripe account. diff --git a/rbi/stripe/resources/balance_transaction.rbi b/rbi/stripe/resources/balance_transaction.rbi index ea39cba38..8c37fce23 100644 --- a/rbi/stripe/resources/balance_transaction.rbi +++ b/rbi/stripe/resources/balance_transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Balance transactions represent funds moving through your Stripe account. # Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. diff --git a/rbi/stripe/resources/bank_account.rbi b/rbi/stripe/resources/bank_account.rbi index 25d85c2bc..f9fe18ff0 100644 --- a/rbi/stripe/resources/bank_account.rbi +++ b/rbi/stripe/resources/bank_account.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # These bank accounts are payment methods on `Customer` objects. # diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi index f419f1ab3..a7e474c41 100644 --- a/rbi/stripe/resources/billing/alert.rbi +++ b/rbi/stripe/resources/billing/alert.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. diff --git a/rbi/stripe/resources/billing/alert_triggered.rbi b/rbi/stripe/resources/billing/alert_triggered.rbi new file mode 100644 index 000000000..0dd1d6dd6 --- /dev/null +++ b/rbi/stripe/resources/billing/alert_triggered.rbi @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class AlertTriggered < APIResource + sig { returns(Stripe::Billing::Alert) } + # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + attr_reader :alert + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # ID of customer for which the alert triggered + attr_reader :customer + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # The value triggering the alert + attr_reader :value + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi index 966ef5a92..8d4cddaeb 100644 --- a/rbi/stripe/resources/billing/credit_balance_summary.rbi +++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # Indicates the billing credit balance for billing credits granted to a customer. diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi index 7fa79cd6d..efe2fe15b 100644 --- a/rbi/stripe/resources/billing/credit_balance_transaction.rbi +++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index 14202ef62..3d9a9184e 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A credit grant is an API resource that documents the allocation of some billing credits to a customer. diff --git a/rbi/stripe/resources/billing/meter.rbi b/rbi/stripe/resources/billing/meter.rbi index 32ce6d6bc..713256681 100644 --- a/rbi/stripe/resources/billing/meter.rbi +++ b/rbi/stripe/resources/billing/meter.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. diff --git a/rbi/stripe/resources/billing/meter_error_report.rbi b/rbi/stripe/resources/billing/meter_error_report.rbi new file mode 100644 index 000000000..65981e0b1 --- /dev/null +++ b/rbi/stripe/resources/billing/meter_error_report.rbi @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class MeterErrorReport < APIResource + class Reason < Stripe::StripeObject + class ErrorType < Stripe::StripeObject + class SampleError < Stripe::StripeObject + class ApiRequest < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :idempotency_key + end + sig { returns(T.nilable(ApiRequest)) } + attr_reader :api_request + sig { returns(String) } + attr_reader :error_message + end + sig { returns(T::Array[SampleError]) } + attr_reader :sample_errors + end + sig { returns(Integer) } + attr_reader :error_count + sig { returns(T::Array[ErrorType]) } + attr_reader :error_types + end + class RelatedObject < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + sig { returns(String) } + attr_reader :object + sig { returns(String) } + attr_reader :url + end + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Reason) } + # Attribute for field reason + attr_reader :reason + sig { returns(T.nilable(RelatedObject)) } + # The related objects about the error + attr_reader :related_object + sig { returns(String) } + # Summary of invalid events + attr_reader :summary + sig { returns(Integer) } + # Time when validation ended. Measured in seconds since the Unix epoch + attr_reader :validation_end + sig { returns(Integer) } + # Time when validation started. Measured in seconds since the Unix epoch + attr_reader :validation_start + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_event.rbi b/rbi/stripe/resources/billing/meter_event.rbi index 4eeff2fb2..de9b92040 100644 --- a/rbi/stripe/resources/billing/meter_event.rbi +++ b/rbi/stripe/resources/billing/meter_event.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. diff --git a/rbi/stripe/resources/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/billing/meter_event_adjustment.rbi index c0c299938..3b4ecfefd 100644 --- a/rbi/stripe/resources/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/billing/meter_event_adjustment.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. diff --git a/rbi/stripe/resources/billing/meter_event_summary.rbi b/rbi/stripe/resources/billing/meter_event_summary.rbi index 6e6b3371c..c03a0dcf5 100644 --- a/rbi/stripe/resources/billing/meter_event_summary.rbi +++ b/rbi/stripe/resources/billing/meter_event_summary.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Billing # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much diff --git a/rbi/stripe/resources/billing_portal/configuration.rbi b/rbi/stripe/resources/billing_portal/configuration.rbi index 122f5ee78..889468ff4 100644 --- a/rbi/stripe/resources/billing_portal/configuration.rbi +++ b/rbi/stripe/resources/billing_portal/configuration.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module BillingPortal # A portal configuration describes the functionality and behavior of a portal session. diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi index 1b6518948..7cda5592d 100644 --- a/rbi/stripe/resources/billing_portal/session.rbi +++ b/rbi/stripe/resources/billing_portal/session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module BillingPortal # The Billing customer portal is a Stripe-hosted UI for subscription and diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi index 0c622b43f..3ad23eb66 100644 --- a/rbi/stripe/resources/capability.rbi +++ b/rbi/stripe/resources/capability.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # This is an object representing a capability for a Stripe account. # diff --git a/rbi/stripe/resources/capital/financing_offer.rbi b/rbi/stripe/resources/capital/financing_offer.rbi index 04c14ce02..b38835e6a 100644 --- a/rbi/stripe/resources/capital/financing_offer.rbi +++ b/rbi/stripe/resources/capital/financing_offer.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Capital # This is an object representing an offer of financing from diff --git a/rbi/stripe/resources/capital/financing_summary.rbi b/rbi/stripe/resources/capital/financing_summary.rbi index b22c9389d..82b34f0c4 100644 --- a/rbi/stripe/resources/capital/financing_summary.rbi +++ b/rbi/stripe/resources/capital/financing_summary.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Capital # A financing object describes an account's current financing state. Used by Connect diff --git a/rbi/stripe/resources/capital/financing_transaction.rbi b/rbi/stripe/resources/capital/financing_transaction.rbi index 5ff645b9d..23328bc6a 100644 --- a/rbi/stripe/resources/capital/financing_transaction.rbi +++ b/rbi/stripe/resources/capital/financing_transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Capital # This is an object representing the details of a transaction on a Capital financing object. diff --git a/rbi/stripe/resources/card.rbi b/rbi/stripe/resources/card.rbi index 4b5ba3975..6ff38acad 100644 --- a/rbi/stripe/resources/card.rbi +++ b/rbi/stripe/resources/card.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # You can store multiple cards on a customer in order to charge the customer # later. You can also store multiple debit cards on a recipient in order to diff --git a/rbi/stripe/resources/cash_balance.rbi b/rbi/stripe/resources/cash_balance.rbi index d8edc4b12..e3991a216 100644 --- a/rbi/stripe/resources/cash_balance.rbi +++ b/rbi/stripe/resources/cash_balance.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. class CashBalance < APIResource diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index d3550e8af..627a6fb5f 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # The `Charge` object represents a single attempt to move money into your Stripe account. # PaymentIntent confirmation is the most common way to create Charges, but transferring diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index d1d726a96..0a8c9a629 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Checkout # A Checkout Session represents your customer's session as they pay for diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi index 5a754908e..e70f319d7 100644 --- a/rbi/stripe/resources/climate/order.rbi +++ b/rbi/stripe/resources/climate/order.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Climate # Orders represent your intent to purchase a particular Climate product. When you create an order, the diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi index 2fd847030..f2c914179 100644 --- a/rbi/stripe/resources/climate/product.rbi +++ b/rbi/stripe/resources/climate/product.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Climate # A Climate product represents a type of carbon removal unit available for reservation. diff --git a/rbi/stripe/resources/climate/supplier.rbi b/rbi/stripe/resources/climate/supplier.rbi index e644c7343..04d8561d9 100644 --- a/rbi/stripe/resources/climate/supplier.rbi +++ b/rbi/stripe/resources/climate/supplier.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Climate # A supplier of carbon removal. diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi index 75646a38e..19356d838 100644 --- a/rbi/stripe/resources/confirmation_token.rbi +++ b/rbi/stripe/resources/confirmation_token.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # ConfirmationTokens help transport client side data collected by Stripe JS over # to your server for confirming a PaymentIntent or SetupIntent. If the confirmation diff --git a/rbi/stripe/resources/connect_collection_transfer.rbi b/rbi/stripe/resources/connect_collection_transfer.rbi new file mode 100644 index 000000000..716c92fd2 --- /dev/null +++ b/rbi/stripe/resources/connect_collection_transfer.rbi @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ConnectCollectionTransfer < APIResource + sig { returns(Integer) } + # Amount transferred, in cents (or local equivalent). + attr_reader :amount + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.any(String, Stripe::Account)) } + # ID of the account that funds are being collected for. + attr_reader :destination + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/country_spec.rbi b/rbi/stripe/resources/country_spec.rbi index d0428db07..3b006e099 100644 --- a/rbi/stripe/resources/country_spec.rbi +++ b/rbi/stripe/resources/country_spec.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Stripe needs to collect certain pieces of information about each account # created. These requirements can differ depending on the account's country. The diff --git a/rbi/stripe/resources/coupon.rbi b/rbi/stripe/resources/coupon.rbi index ce096c6ea..711b2c7c6 100644 --- a/rbi/stripe/resources/coupon.rbi +++ b/rbi/stripe/resources/coupon.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi index 86361f503..d179e2935 100644 --- a/rbi/stripe/resources/credit_note.rbi +++ b/rbi/stripe/resources/credit_note.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Issue a credit note to adjust an invoice's amount after the invoice is finalized. # diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi index 1f7af46e8..e3ea6442d 100644 --- a/rbi/stripe/resources/credit_note_line_item.rbi +++ b/rbi/stripe/resources/credit_note_line_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # The credit note line item object class CreditNoteLineItem < StripeObject diff --git a/rbi/stripe/resources/customer.rbi b/rbi/stripe/resources/customer.rbi index 9c7a45c2b..588078036 100644 --- a/rbi/stripe/resources/customer.rbi +++ b/rbi/stripe/resources/customer.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, # and track payments that belong to the same customer. diff --git a/rbi/stripe/resources/customer_balance_transaction.rbi b/rbi/stripe/resources/customer_balance_transaction.rbi index 32c94e985..0dd62d98b 100644 --- a/rbi/stripe/resources/customer_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_balance_transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, # which denotes a debit or credit that's automatically applied to their next invoice upon finalization. diff --git a/rbi/stripe/resources/customer_cash_balance_transaction.rbi b/rbi/stripe/resources/customer_cash_balance_transaction.rbi index 8cf3f8daa..4864d51b8 100644 --- a/rbi/stripe/resources/customer_cash_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_cash_balance_transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Customers with certain payments enabled have a cash balance, representing funds that were paid # by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi index dd08d9292..55e768f7b 100644 --- a/rbi/stripe/resources/customer_session.rbi +++ b/rbi/stripe/resources/customer_session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access # control over a Customer. diff --git a/rbi/stripe/resources/discount.rbi b/rbi/stripe/resources/discount.rbi index 941d437d3..cc007e93d 100644 --- a/rbi/stripe/resources/discount.rbi +++ b/rbi/stripe/resources/discount.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). # It contains information about when the discount began, when it will end, and what it is applied to. diff --git a/rbi/stripe/resources/dispute.rbi b/rbi/stripe/resources/dispute.rbi index 8e834dc25..ea7e2266b 100644 --- a/rbi/stripe/resources/dispute.rbi +++ b/rbi/stripe/resources/dispute.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A dispute occurs when a customer questions your charge with their card issuer. # When this happens, you have the opportunity to respond to the dispute with diff --git a/rbi/stripe/resources/entitlements/active_entitlement.rbi b/rbi/stripe/resources/entitlements/active_entitlement.rbi index 5ebff6bf8..a62340126 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Entitlements # An active entitlement describes access to a feature for a customer. diff --git a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi new file mode 100644 index 000000000..44b1d8031 --- /dev/null +++ b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Entitlements + # A summary of a customer's active entitlements. + class ActiveEntitlementSummary < APIResource + sig { returns(String) } + # The customer that is entitled to this feature. + attr_reader :customer + sig { returns(Stripe::ListObject) } + # The list of entitlements this customer has. + attr_reader :entitlements + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/feature.rbi b/rbi/stripe/resources/entitlements/feature.rbi index d31e6d20d..aecd2d91b 100644 --- a/rbi/stripe/resources/entitlements/feature.rbi +++ b/rbi/stripe/resources/entitlements/feature.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Entitlements # A feature represents a monetizable ability or functionality in your system. diff --git a/rbi/stripe/resources/ephemeral_key.rbi b/rbi/stripe/resources/ephemeral_key.rbi index 4660d6a42..76524e224 100644 --- a/rbi/stripe/resources/ephemeral_key.rbi +++ b/rbi/stripe/resources/ephemeral_key.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe class EphemeralKey < APIResource sig { returns(Integer) } diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi index ef3efe0a8..0ea7ccaef 100644 --- a/rbi/stripe/resources/event.rbi +++ b/rbi/stripe/resources/event.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Events are our way of letting you know when something interesting happens in # your account. When an interesting event occurs, we create a new `Event` diff --git a/rbi/stripe/resources/exchange_rate.rbi b/rbi/stripe/resources/exchange_rate.rbi index 69b7bd265..f4510f618 100644 --- a/rbi/stripe/resources/exchange_rate.rbi +++ b/rbi/stripe/resources/exchange_rate.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # `ExchangeRate` objects allow you to determine the rates that Stripe is currently # using to convert from one currency to another. Since this number is variable diff --git a/rbi/stripe/resources/file.rbi b/rbi/stripe/resources/file.rbi index bd64d4fc6..0523f5149 100644 --- a/rbi/stripe/resources/file.rbi +++ b/rbi/stripe/resources/file.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # This object represents files hosted on Stripe's servers. You can upload # files with the [create file](https://stripe.com/docs/api#create_file) request diff --git a/rbi/stripe/resources/file_link.rbi b/rbi/stripe/resources/file_link.rbi index 737f4e831..d371d092b 100644 --- a/rbi/stripe/resources/file_link.rbi +++ b/rbi/stripe/resources/file_link.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # To share the contents of a `File` object with non-Stripe users, you can # create a `FileLink`. `FileLink`s contain a URL that you can use to diff --git a/rbi/stripe/resources/financial_connections/account.rbi b/rbi/stripe/resources/financial_connections/account.rbi index 3031c2089..8162395c5 100644 --- a/rbi/stripe/resources/financial_connections/account.rbi +++ b/rbi/stripe/resources/financial_connections/account.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. diff --git a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi index 5b55042c0..4c61210cc 100644 --- a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +++ b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. diff --git a/rbi/stripe/resources/financial_connections/account_owner.rbi b/rbi/stripe/resources/financial_connections/account_owner.rbi index abfba5c53..cc68f2f8d 100644 --- a/rbi/stripe/resources/financial_connections/account_owner.rbi +++ b/rbi/stripe/resources/financial_connections/account_owner.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # Describes an owner of an account. diff --git a/rbi/stripe/resources/financial_connections/account_ownership.rbi b/rbi/stripe/resources/financial_connections/account_ownership.rbi index fa5843335..25918d1fa 100644 --- a/rbi/stripe/resources/financial_connections/account_ownership.rbi +++ b/rbi/stripe/resources/financial_connections/account_ownership.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # Describes a snapshot of the owners of an account at a particular point in time. diff --git a/rbi/stripe/resources/financial_connections/institution.rbi b/rbi/stripe/resources/financial_connections/institution.rbi index 93be85653..3474fadef 100644 --- a/rbi/stripe/resources/financial_connections/institution.rbi +++ b/rbi/stripe/resources/financial_connections/institution.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow. diff --git a/rbi/stripe/resources/financial_connections/session.rbi b/rbi/stripe/resources/financial_connections/session.rbi index a9a55db82..11a654d5f 100644 --- a/rbi/stripe/resources/financial_connections/session.rbi +++ b/rbi/stripe/resources/financial_connections/session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. diff --git a/rbi/stripe/resources/financial_connections/transaction.rbi b/rbi/stripe/resources/financial_connections/transaction.rbi index 70313a66e..c5e6585d8 100644 --- a/rbi/stripe/resources/financial_connections/transaction.rbi +++ b/rbi/stripe/resources/financial_connections/transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module FinancialConnections # A Transaction represents a real transaction that affects a Financial Connections Account balance. diff --git a/rbi/stripe/resources/forwarding/request.rbi b/rbi/stripe/resources/forwarding/request.rbi index 602ab20f1..7f3373b2c 100644 --- a/rbi/stripe/resources/forwarding/request.rbi +++ b/rbi/stripe/resources/forwarding/request.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Forwarding # Instructs Stripe to make a request on your behalf using the destination URL. The destination URL diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi index d1d45ef34..3facb2f9e 100644 --- a/rbi/stripe/resources/funding_instructions.rbi +++ b/rbi/stripe/resources/funding_instructions.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is # automatically applied to future invoices and payments using the `customer_balance` payment method. diff --git a/rbi/stripe/resources/gift_cards/card.rbi b/rbi/stripe/resources/gift_cards/card.rbi index 9956eccdc..066816800 100644 --- a/rbi/stripe/resources/gift_cards/card.rbi +++ b/rbi/stripe/resources/gift_cards/card.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module GiftCards # A gift card represents a single gift card owned by a customer, including the diff --git a/rbi/stripe/resources/gift_cards/transaction.rbi b/rbi/stripe/resources/gift_cards/transaction.rbi index ccd7fe6fa..8d486f84d 100644 --- a/rbi/stripe/resources/gift_cards/transaction.rbi +++ b/rbi/stripe/resources/gift_cards/transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module GiftCards # A gift card transaction represents a single transaction on a referenced gift card. diff --git a/rbi/stripe/resources/identity/verification_report.rbi b/rbi/stripe/resources/identity/verification_report.rbi index 84a90ca1c..aa18b876f 100644 --- a/rbi/stripe/resources/identity/verification_report.rbi +++ b/rbi/stripe/resources/identity/verification_report.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Identity # A VerificationReport is the result of an attempt to collect and verify data from a user. diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi index 08c5eb1e4..a6bb69001 100644 --- a/rbi/stripe/resources/identity/verification_session.rbi +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Identity # A VerificationSession guides you through the process of collecting and verifying the identities diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index c7c5c6759..fc3893eb0 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Invoices are statements of amounts owed by a customer, and are either # generated one-off, or generated periodically from a subscription. diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi index 3afe967c7..d0c0fc11a 100644 --- a/rbi/stripe/resources/invoice_item.rbi +++ b/rbi/stripe/resources/invoice_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an # invoice by creating or updating it with an `invoice` field, at which point it will be included as diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi index 9f4edb3da..8c587d7b9 100644 --- a/rbi/stripe/resources/invoice_line_item.rbi +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice. # diff --git a/rbi/stripe/resources/invoice_payment.rbi b/rbi/stripe/resources/invoice_payment.rbi index c5279bfc1..4dccf0f92 100644 --- a/rbi/stripe/resources/invoice_payment.rbi +++ b/rbi/stripe/resources/invoice_payment.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # The invoice payment object class InvoicePayment < APIResource diff --git a/rbi/stripe/resources/invoice_rendering_template.rbi b/rbi/stripe/resources/invoice_rendering_template.rbi index 1cf4398a7..5f2c3e939 100644 --- a/rbi/stripe/resources/invoice_rendering_template.rbi +++ b/rbi/stripe/resources/invoice_rendering_template.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates # can be created from within the Dashboard, and they can be used over the API when creating invoices. diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi index fcc28ce3c..5748c28e2 100644 --- a/rbi/stripe/resources/issuing/authorization.rbi +++ b/rbi/stripe/resources/issuing/authorization.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` diff --git a/rbi/stripe/resources/issuing/card.rbi b/rbi/stripe/resources/issuing/card.rbi index a30e71f62..c232e804e 100644 --- a/rbi/stripe/resources/issuing/card.rbi +++ b/rbi/stripe/resources/issuing/card.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. diff --git a/rbi/stripe/resources/issuing/cardholder.rbi b/rbi/stripe/resources/issuing/cardholder.rbi index f2e6e4615..ee2b27fe1 100644 --- a/rbi/stripe/resources/issuing/cardholder.rbi +++ b/rbi/stripe/resources/issuing/cardholder.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. diff --git a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi index c21690be0..7bad74caf 100644 --- a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +++ b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # Every time an applicant submits an application for a Charge Card product your platform offers, or every time your platform takes a proactive credit decision on an existing account, you must record the decision by creating a new `CreditUnderwritingRecord` object on a connected account. diff --git a/rbi/stripe/resources/issuing/dispute.rbi b/rbi/stripe/resources/issuing/dispute.rbi index 4dffcf177..cf2ab7e68 100644 --- a/rbi/stripe/resources/issuing/dispute.rbi +++ b/rbi/stripe/resources/issuing/dispute.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. diff --git a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi index 992001c0d..309ad946d 100644 --- a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +++ b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects. diff --git a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi index 9450a23d2..2435ce53c 100644 --- a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +++ b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. diff --git a/rbi/stripe/resources/issuing/personalization_design.rbi b/rbi/stripe/resources/issuing/personalization_design.rbi index ac18ed2b8..5501e8cb1 100644 --- a/rbi/stripe/resources/issuing/personalization_design.rbi +++ b/rbi/stripe/resources/issuing/personalization_design.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. diff --git a/rbi/stripe/resources/issuing/physical_bundle.rbi b/rbi/stripe/resources/issuing/physical_bundle.rbi index a96d675b8..31db54f76 100644 --- a/rbi/stripe/resources/issuing/physical_bundle.rbi +++ b/rbi/stripe/resources/issuing/physical_bundle.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. diff --git a/rbi/stripe/resources/issuing/settlement.rbi b/rbi/stripe/resources/issuing/settlement.rbi new file mode 100644 index 000000000..c754c8033 --- /dev/null +++ b/rbi/stripe/resources/issuing/settlement.rbi @@ -0,0 +1,62 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + # When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. + class Settlement < APIResource + sig { returns(String) } + # The Bank Identification Number reflecting this settlement record. + attr_reader :bin + sig { returns(Integer) } + # The date that the transactions are cleared and posted to user's accounts. + attr_reader :clearing_date + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(Integer) } + # The total interchange received as reimbursement for the transactions. + attr_reader :interchange_fees + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + sig { returns(Integer) } + # The total net amount required to settle with the network. + attr_reader :net_total + sig { returns(String) } + # The card network for this settlement report. One of ["visa", "maestro"] + attr_reader :network + sig { returns(Integer) } + # The total amount of fees owed to the network. + attr_reader :network_fees + sig { returns(String) } + # The Settlement Identification Number assigned by the network. + attr_reader :network_settlement_identifier + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # One of `international` or `uk_national_net`. + attr_reader :settlement_service + sig { returns(String) } + # The current processing status of this settlement. + attr_reader :status + sig { returns(Integer) } + # The total number of transactions reflected in this settlement. + attr_reader :transaction_count + sig { returns(Integer) } + # The total transaction amount reflected in this settlement. + attr_reader :transaction_volume + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/token.rbi b/rbi/stripe/resources/issuing/token.rbi index aff9f7c9c..6e427223f 100644 --- a/rbi/stripe/resources/issuing/token.rbi +++ b/rbi/stripe/resources/issuing/token.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi index 28f391abe..d11aa8e17 100644 --- a/rbi/stripe/resources/issuing/transaction.rbi +++ b/rbi/stripe/resources/issuing/transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Issuing # Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi index caf31b9e3..3b6a6db8a 100644 --- a/rbi/stripe/resources/line_item.rbi +++ b/rbi/stripe/resources/line_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A line item. class LineItem < APIResource diff --git a/rbi/stripe/resources/login_link.rbi b/rbi/stripe/resources/login_link.rbi index 483c36f2c..eca4eb558 100644 --- a/rbi/stripe/resources/login_link.rbi +++ b/rbi/stripe/resources/login_link.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. class LoginLink < APIResource diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi index 6dba0ab74..914b85a50 100644 --- a/rbi/stripe/resources/mandate.rbi +++ b/rbi/stripe/resources/mandate.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A Mandate is a record of the permission that your customer gives you to debit their payment method. class Mandate < APIResource diff --git a/rbi/stripe/resources/margin.rbi b/rbi/stripe/resources/margin.rbi index 748b5f2e7..09335115e 100644 --- a/rbi/stripe/resources/margin.rbi +++ b/rbi/stripe/resources/margin.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who # resell products and services and earn a discount (margin) for doing so. diff --git a/rbi/stripe/resources/order.rbi b/rbi/stripe/resources/order.rbi index c9c2ca4b0..b97c8a79d 100644 --- a/rbi/stripe/resources/order.rbi +++ b/rbi/stripe/resources/order.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # An Order describes a purchase being made by a customer, including the # products & quantities being purchased, the order status, the payment information, diff --git a/rbi/stripe/resources/payment_attempt_record.rbi b/rbi/stripe/resources/payment_attempt_record.rbi index aa3705a1c..071114bca 100644 --- a/rbi/stripe/resources/payment_attempt_record.rbi +++ b/rbi/stripe/resources/payment_attempt_record.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. # Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index c6cfc54d3..d6edd6d96 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A PaymentIntent guides you through the process of collecting a payment from your customer. # We recommend that you create exactly one PaymentIntent for each order or diff --git a/rbi/stripe/resources/payment_link.rbi b/rbi/stripe/resources/payment_link.rbi index 5716e8403..2b51a69b1 100644 --- a/rbi/stripe/resources/payment_link.rbi +++ b/rbi/stripe/resources/payment_link.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. # diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi index 53b17c461..b98e52cb2 100644 --- a/rbi/stripe/resources/payment_method.rbi +++ b/rbi/stripe/resources/payment_method.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # PaymentMethod objects represent your customer's payment instruments. # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to diff --git a/rbi/stripe/resources/payment_method_configuration.rbi b/rbi/stripe/resources/payment_method_configuration.rbi index 9adb77af6..ad627de89 100644 --- a/rbi/stripe/resources/payment_method_configuration.rbi +++ b/rbi/stripe/resources/payment_method_configuration.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios. # diff --git a/rbi/stripe/resources/payment_method_domain.rbi b/rbi/stripe/resources/payment_method_domain.rbi index faebee260..fe03b8a7a 100644 --- a/rbi/stripe/resources/payment_method_domain.rbi +++ b/rbi/stripe/resources/payment_method_domain.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A payment method domain represents a web domain that you have registered with Stripe. # Stripe Elements use registered payment method domains to control where certain payment methods are shown. diff --git a/rbi/stripe/resources/payment_record.rbi b/rbi/stripe/resources/payment_record.rbi index d69bded51..6c34020ac 100644 --- a/rbi/stripe/resources/payment_record.rbi +++ b/rbi/stripe/resources/payment_record.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. # For example, you can create a Payment Record to model a payment made on a different payment processor, diff --git a/rbi/stripe/resources/payout.rbi b/rbi/stripe/resources/payout.rbi index e66c3827b..dfd1615fa 100644 --- a/rbi/stripe/resources/payout.rbi +++ b/rbi/stripe/resources/payout.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A `Payout` object is created when you receive funds from Stripe, or when you # initiate a payout to either a bank account or debit card of a [connected diff --git a/rbi/stripe/resources/person.rbi b/rbi/stripe/resources/person.rbi index 4aa92d7f3..0c747f1d8 100644 --- a/rbi/stripe/resources/person.rbi +++ b/rbi/stripe/resources/person.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # This is an object representing a person associated with a Stripe account. # diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi index 7ae87f011..247c12a81 100644 --- a/rbi/stripe/resources/plan.rbi +++ b/rbi/stripe/resources/plan.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. # diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi index b537d9f93..7e012570b 100644 --- a/rbi/stripe/resources/price.rbi +++ b/rbi/stripe/resources/price.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi index 3e0486c2f..ce669dfed 100644 --- a/rbi/stripe/resources/product.rbi +++ b/rbi/stripe/resources/product.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Products describe the specific goods or services you offer to your customers. # For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. diff --git a/rbi/stripe/resources/product_feature.rbi b/rbi/stripe/resources/product_feature.rbi index 282d5ed47..cdb0717a8 100644 --- a/rbi/stripe/resources/product_feature.rbi +++ b/rbi/stripe/resources/product_feature.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A product_feature represents an attachment between a feature and a product. # When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. diff --git a/rbi/stripe/resources/promotion_code.rbi b/rbi/stripe/resources/promotion_code.rbi index a0ebe9f34..4c84a56a7 100644 --- a/rbi/stripe/resources/promotion_code.rbi +++ b/rbi/stripe/resources/promotion_code.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to # create multiple codes for a single coupon. diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index 6978605de..219e73629 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A Quote is a way to model prices that you'd like to provide to a customer. # Once accepted, it will automatically create an invoice, subscription or subscription schedule. diff --git a/rbi/stripe/resources/quote_line.rbi b/rbi/stripe/resources/quote_line.rbi new file mode 100644 index 000000000..bdc5ec3e8 --- /dev/null +++ b/rbi/stripe/resources/quote_line.rbi @@ -0,0 +1,267 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + # A quote line defines a set of changes, in the order provided, that will be applied upon quote acceptance. + class QuoteLine < APIResource + class Action < Stripe::StripeObject + class AddDiscount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(Integer)) } + attr_reader :index + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class AddItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class Trial < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :converts_to + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + sig { returns(Integer) } + attr_reader :quantity + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :tax_rates + sig { returns(T.nilable(Trial)) } + attr_reader :trial + end + class RemoveDiscount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class RemoveItem < Stripe::StripeObject + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + end + class SetDiscount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class SetItem < Stripe::StripeObject + class Discount < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } + attr_reader :coupon + sig { returns(T.nilable(T.any(String, Stripe::Discount))) } + attr_reader :discount + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + attr_reader :promotion_code + end + class Trial < Stripe::StripeObject + sig { returns(T.nilable(T::Array[String])) } + attr_reader :converts_to + sig { returns(String) } + attr_reader :type + end + sig { returns(T::Array[Discount]) } + attr_reader :discounts + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + sig { returns(T.any(String, Stripe::Price)) } + attr_reader :price + sig { returns(Integer) } + attr_reader :quantity + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + attr_reader :tax_rates + sig { returns(T.nilable(Trial)) } + attr_reader :trial + end + sig { returns(T.nilable(AddDiscount)) } + attr_reader :add_discount + sig { returns(T.nilable(AddItem)) } + attr_reader :add_item + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :add_metadata + sig { returns(T.nilable(RemoveDiscount)) } + attr_reader :remove_discount + sig { returns(T.nilable(RemoveItem)) } + attr_reader :remove_item + sig { returns(T.nilable(T::Array[String])) } + attr_reader :remove_metadata + sig { returns(T.nilable(T::Array[SetDiscount])) } + attr_reader :set_discounts + sig { returns(T.nilable(T::Array[SetItem])) } + attr_reader :set_items + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :set_metadata + sig { returns(String) } + attr_reader :type + end + class AppliesTo < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :new_reference + sig { returns(T.nilable(String)) } + attr_reader :subscription_schedule + sig { returns(String) } + attr_reader :type + end + class CancelSubscriptionSchedule < Stripe::StripeObject + sig { returns(String) } + attr_reader :cancel_at + sig { returns(T.nilable(T::Boolean)) } + attr_reader :invoice_now + sig { returns(T.nilable(T::Boolean)) } + attr_reader :prorate + end + class EndsAt < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(String) } + attr_reader :discount + end + class Duration < Stripe::StripeObject + sig { returns(String) } + attr_reader :interval + sig { returns(Integer) } + attr_reader :interval_count + end + sig { returns(T.nilable(Integer)) } + attr_reader :computed + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(Duration)) } + attr_reader :duration + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + class SetPauseCollection < Stripe::StripeObject + class Set < Stripe::StripeObject + sig { returns(String) } + attr_reader :behavior + end + sig { returns(T.nilable(Set)) } + attr_reader :set + sig { returns(String) } + attr_reader :type + end + class StartsAt < Stripe::StripeObject + class DiscountEnd < Stripe::StripeObject + sig { returns(String) } + attr_reader :discount + end + class LineEndsAt < Stripe::StripeObject + sig { returns(String) } + attr_reader :id + end + sig { returns(T.nilable(Integer)) } + attr_reader :computed + sig { returns(T.nilable(DiscountEnd)) } + attr_reader :discount_end + sig { returns(T.nilable(LineEndsAt)) } + attr_reader :line_ends_at + sig { returns(T.nilable(Integer)) } + attr_reader :timestamp + sig { returns(String) } + attr_reader :type + end + class TrialSettings < Stripe::StripeObject + class EndBehavior < Stripe::StripeObject + sig { returns(T.nilable(String)) } + attr_reader :prorate_up_front + end + sig { returns(T.nilable(EndBehavior)) } + attr_reader :end_behavior + end + sig { returns(T::Array[Action]) } + # A list of items the customer is being quoted for. + attr_reader :actions + sig { returns(T.nilable(AppliesTo)) } + # Details to identify the subscription schedule the quote line applies to. + attr_reader :applies_to + sig { returns(T.nilable(String)) } + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + attr_reader :billing_cycle_anchor + sig { returns(T.nilable(CancelSubscriptionSchedule)) } + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + attr_reader :cancel_subscription_schedule + sig { returns(T.nilable(EndsAt)) } + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + attr_reader :ends_at + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(T.nilable(String)) } + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + attr_reader :proration_behavior + sig { returns(T.nilable(SetPauseCollection)) } + # Details to modify the pause_collection behavior of the subscription schedule. + attr_reader :set_pause_collection + sig { returns(T.nilable(String)) } + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + attr_reader :set_schedule_end + sig { returns(T.nilable(StartsAt)) } + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_reader :starts_at + sig { returns(T.nilable(TrialSettings)) } + # Settings related to subscription trials. + attr_reader :trial_settings + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_invoice.rbi b/rbi/stripe/resources/quote_preview_invoice.rbi index 24e17f4a2..99adb00cc 100644 --- a/rbi/stripe/resources/quote_preview_invoice.rbi +++ b/rbi/stripe/resources/quote_preview_invoice.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Invoices are statements of amounts owed by a customer, and are either # generated one-off, or generated periodically from a subscription. diff --git a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi index fe0a4f34c..7561ba8e0 100644 --- a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +++ b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe class QuotePreviewSubscriptionSchedule < APIResource class AppliesTo < Stripe::StripeObject diff --git a/rbi/stripe/resources/radar/early_fraud_warning.rbi b/rbi/stripe/resources/radar/early_fraud_warning.rbi index e48bab989..5908a679c 100644 --- a/rbi/stripe/resources/radar/early_fraud_warning.rbi +++ b/rbi/stripe/resources/radar/early_fraud_warning.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Radar # An early fraud warning indicates that the card issuer has notified us that a diff --git a/rbi/stripe/resources/radar/value_list.rbi b/rbi/stripe/resources/radar/value_list.rbi index 8eff62249..8d38f344b 100644 --- a/rbi/stripe/resources/radar/value_list.rbi +++ b/rbi/stripe/resources/radar/value_list.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Radar # Value lists allow you to group values together which can then be referenced in rules. diff --git a/rbi/stripe/resources/radar/value_list_item.rbi b/rbi/stripe/resources/radar/value_list_item.rbi index 9792a671b..6b9e595c1 100644 --- a/rbi/stripe/resources/radar/value_list_item.rbi +++ b/rbi/stripe/resources/radar/value_list_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Radar # Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi index ac99db7d3..fdd1fc9e1 100644 --- a/rbi/stripe/resources/refund.rbi +++ b/rbi/stripe/resources/refund.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Refund objects allow you to refund a previously created charge that isn't # refunded yet. Funds are refunded to the credit or debit card that's diff --git a/rbi/stripe/resources/reporting/report_run.rbi b/rbi/stripe/resources/reporting/report_run.rbi index d0608859d..c9a65293e 100644 --- a/rbi/stripe/resources/reporting/report_run.rbi +++ b/rbi/stripe/resources/reporting/report_run.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Reporting # The Report Run object represents an instance of a report type generated with diff --git a/rbi/stripe/resources/reporting/report_type.rbi b/rbi/stripe/resources/reporting/report_type.rbi index a448928ef..b8e3c9782 100644 --- a/rbi/stripe/resources/reporting/report_type.rbi +++ b/rbi/stripe/resources/reporting/report_type.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Reporting # The Report Type resource corresponds to a particular type of report, such as diff --git a/rbi/stripe/resources/reserve_transaction.rbi b/rbi/stripe/resources/reserve_transaction.rbi new file mode 100644 index 000000000..5bec97e5b --- /dev/null +++ b/rbi/stripe/resources/reserve_transaction.rbi @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ReserveTransaction < APIResource + sig { returns(Integer) } + # Attribute for field amount + attr_reader :amount + sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/reversal.rbi b/rbi/stripe/resources/reversal.rbi index e6a4e1a0d..bc5c1f4eb 100644 --- a/rbi/stripe/resources/reversal.rbi +++ b/rbi/stripe/resources/reversal.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a # connected account, either entirely or partially, and can also specify whether diff --git a/rbi/stripe/resources/review.rbi b/rbi/stripe/resources/review.rbi index 6f4b5562d..ea0280f45 100644 --- a/rbi/stripe/resources/review.rbi +++ b/rbi/stripe/resources/review.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Reviews can be used to supplement automated fraud detection with human expertise. # diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi index 8a40348f6..e7b6da000 100644 --- a/rbi/stripe/resources/setup_attempt.rbi +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A SetupAttempt describes one attempted confirmation of a SetupIntent, # whether that confirmation is successful or unsuccessful. You can use diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index d63005ea3..3ff54f8b1 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. diff --git a/rbi/stripe/resources/shipping_rate.rbi b/rbi/stripe/resources/shipping_rate.rbi index 02196c6f7..1b9b2c058 100644 --- a/rbi/stripe/resources/shipping_rate.rbi +++ b/rbi/stripe/resources/shipping_rate.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Shipping rates describe the price of shipping presented to your customers and # applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). diff --git a/rbi/stripe/resources/sigma/scheduled_query_run.rbi b/rbi/stripe/resources/sigma/scheduled_query_run.rbi index 7ac7fb5ce..18025847d 100644 --- a/rbi/stripe/resources/sigma/scheduled_query_run.rbi +++ b/rbi/stripe/resources/sigma/scheduled_query_run.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Sigma # If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll diff --git a/rbi/stripe/resources/source.rbi b/rbi/stripe/resources/source.rbi index 444707599..9116e3446 100644 --- a/rbi/stripe/resources/source.rbi +++ b/rbi/stripe/resources/source.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # `Source` objects allow you to accept a variety of payment methods. They # represent a customer's payment instrument, and can be used with the Stripe API diff --git a/rbi/stripe/resources/source_mandate_notification.rbi b/rbi/stripe/resources/source_mandate_notification.rbi new file mode 100644 index 000000000..75df160c6 --- /dev/null +++ b/rbi/stripe/resources/source_mandate_notification.rbi @@ -0,0 +1,72 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + # Source mandate notifications should be created when a notification related to + # a source mandate must be sent to the payer. They will trigger a webhook or + # deliver an email to the customer. + class SourceMandateNotification < APIResource + class AcssDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :statement_descriptor + end + class BacsDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :last4 + end + class SepaDebit < Stripe::StripeObject + sig { returns(String) } + attr_reader :creditor_identifier + sig { returns(String) } + attr_reader :last4 + sig { returns(String) } + attr_reader :mandate_reference + end + sig { returns(AcssDebit) } + # Attribute for field acss_debit + attr_reader :acss_debit + sig { returns(T.nilable(Integer)) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + attr_reader :amount + sig { returns(BacsDebit) } + # Attribute for field bacs_debit + attr_reader :bacs_debit + sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + attr_reader :livemode + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(String) } + # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + attr_reader :reason + sig { returns(SepaDebit) } + # Attribute for field sepa_debit + attr_reader :sepa_debit + sig { returns(Stripe::Source) } + # `Source` objects allow you to accept a variety of payment methods. They + # represent a customer's payment instrument, and can be used with the Stripe API + # just like a `Card` object: once chargeable, they can be charged, or can be + # attached to customers. + # + # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). + # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). + # This newer API provides access to our latest features and payment method types. + # + # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + attr_reader :source + sig { returns(String) } + # The status of the mandate notification. Valid statuses are `pending` or `submitted`. + attr_reader :status + sig { returns(String) } + # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + attr_reader :type + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/source_transaction.rbi b/rbi/stripe/resources/source_transaction.rbi index 012793657..7345a49f6 100644 --- a/rbi/stripe/resources/source_transaction.rbi +++ b/rbi/stripe/resources/source_transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Some payment methods have no required amount that a customer must send. # Customers can be instructed to send any amount, and it can be made up of diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index 154b95162..caeab2fc0 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Subscriptions allow you to charge a customer on a recurring basis. # diff --git a/rbi/stripe/resources/subscription_item.rbi b/rbi/stripe/resources/subscription_item.rbi index 213f12579..ac87a5823 100644 --- a/rbi/stripe/resources/subscription_item.rbi +++ b/rbi/stripe/resources/subscription_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Subscription items allow you to create customer subscriptions with more than # one plan, making it easy to represent complex billing relationships. diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index 33d346597..808dc724f 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. # diff --git a/rbi/stripe/resources/tax/association.rbi b/rbi/stripe/resources/tax/association.rbi index 4e1b7f09d..eed008d08 100644 --- a/rbi/stripe/resources/tax/association.rbi +++ b/rbi/stripe/resources/tax/association.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax # A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi index 4e6642365..04b5f4d2c 100644 --- a/rbi/stripe/resources/tax/calculation.rbi +++ b/rbi/stripe/resources/tax/calculation.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax # A Tax Calculation allows you to calculate the tax to collect from your customer. diff --git a/rbi/stripe/resources/tax/calculation_line_item.rbi b/rbi/stripe/resources/tax/calculation_line_item.rbi index 3bc166ad6..7503a62bd 100644 --- a/rbi/stripe/resources/tax/calculation_line_item.rbi +++ b/rbi/stripe/resources/tax/calculation_line_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax class CalculationLineItem < APIResource diff --git a/rbi/stripe/resources/tax/form.rbi b/rbi/stripe/resources/tax/form.rbi index 5abaa67c5..50eb235f4 100644 --- a/rbi/stripe/resources/tax/form.rbi +++ b/rbi/stripe/resources/tax/form.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax # Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes. diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi index 63e35760b..71290cf95 100644 --- a/rbi/stripe/resources/tax/registration.rbi +++ b/rbi/stripe/resources/tax/registration.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax # A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax). diff --git a/rbi/stripe/resources/tax/settings.rbi b/rbi/stripe/resources/tax/settings.rbi index 996ddc2a1..33751bfb4 100644 --- a/rbi/stripe/resources/tax/settings.rbi +++ b/rbi/stripe/resources/tax/settings.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax # You can use Tax `Settings` to manage configurations used by Stripe Tax calculations. diff --git a/rbi/stripe/resources/tax/transaction.rbi b/rbi/stripe/resources/tax/transaction.rbi index 3878452f6..1000305d7 100644 --- a/rbi/stripe/resources/tax/transaction.rbi +++ b/rbi/stripe/resources/tax/transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax # A Tax Transaction records the tax collected from or refunded to your customer. diff --git a/rbi/stripe/resources/tax/transaction_line_item.rbi b/rbi/stripe/resources/tax/transaction_line_item.rbi index ec51fc04c..0425f2f49 100644 --- a/rbi/stripe/resources/tax/transaction_line_item.rbi +++ b/rbi/stripe/resources/tax/transaction_line_item.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Tax class TransactionLineItem < APIResource diff --git a/rbi/stripe/resources/tax_code.rbi b/rbi/stripe/resources/tax_code.rbi index 85eb4bb00..61d513279 100644 --- a/rbi/stripe/resources/tax_code.rbi +++ b/rbi/stripe/resources/tax_code.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. class TaxCode < APIResource diff --git a/rbi/stripe/resources/tax_deducted_at_source.rbi b/rbi/stripe/resources/tax_deducted_at_source.rbi new file mode 100644 index 000000000..4271140df --- /dev/null +++ b/rbi/stripe/resources/tax_deducted_at_source.rbi @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TaxDeductedAtSource < APIResource + sig { returns(String) } + # Unique identifier for the object. + attr_reader :id + sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + attr_reader :object + sig { returns(Integer) } + # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + attr_reader :period_end + sig { returns(Integer) } + # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + attr_reader :period_start + sig { returns(String) } + # The TAN that was supplied to Stripe when TDS was assessed + attr_reader :tax_deduction_account_number + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_id.rbi b/rbi/stripe/resources/tax_id.rbi index d44d7c344..9844a442f 100644 --- a/rbi/stripe/resources/tax_id.rbi +++ b/rbi/stripe/resources/tax_id.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account. # Customer and account tax IDs get displayed on related invoices and credit notes. diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi index 3ff9bf30e..952ef7f8d 100644 --- a/rbi/stripe/resources/tax_rate.rbi +++ b/rbi/stripe/resources/tax_rate.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. # diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi index f91710ff0..c1fe96bfc 100644 --- a/rbi/stripe/resources/terminal/configuration.rbi +++ b/rbi/stripe/resources/terminal/configuration.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Terminal # A Configurations object represents how features should be configured for terminal readers. diff --git a/rbi/stripe/resources/terminal/connection_token.rbi b/rbi/stripe/resources/terminal/connection_token.rbi index 19fd36e07..a22e7d28e 100644 --- a/rbi/stripe/resources/terminal/connection_token.rbi +++ b/rbi/stripe/resources/terminal/connection_token.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Terminal # A Connection Token is used by the Stripe Terminal SDK to connect to a reader. diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi index dea0366ce..eea6a8ce6 100644 --- a/rbi/stripe/resources/terminal/location.rbi +++ b/rbi/stripe/resources/terminal/location.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Terminal # A Location represents a grouping of readers. diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index 7a1a96ebc..d6d31698e 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Terminal # A Reader represents a physical device for accepting payment details. diff --git a/rbi/stripe/resources/terminal/reader_collected_data.rbi b/rbi/stripe/resources/terminal/reader_collected_data.rbi index 43980009e..fe0db0af9 100644 --- a/rbi/stripe/resources/terminal/reader_collected_data.rbi +++ b/rbi/stripe/resources/terminal/reader_collected_data.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Terminal # Returns data collected by Terminal readers. This data is only stored for 24 hours. diff --git a/rbi/stripe/resources/test_helpers/test_clock.rbi b/rbi/stripe/resources/test_helpers/test_clock.rbi index 913ddd01f..8beba43e9 100644 --- a/rbi/stripe/resources/test_helpers/test_clock.rbi +++ b/rbi/stripe/resources/test_helpers/test_clock.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module TestHelpers # A test clock enables deterministic control over objects in testmode. With a test clock, you can create diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi index 6ec6cf013..0c81fe46e 100644 --- a/rbi/stripe/resources/token.rbi +++ b/rbi/stripe/resources/token.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Tokenization is the process Stripe uses to collect sensitive card or bank # account details, or personally identifiable information (PII), directly from diff --git a/rbi/stripe/resources/topup.rbi b/rbi/stripe/resources/topup.rbi index fedf08bf0..98c75e6ea 100644 --- a/rbi/stripe/resources/topup.rbi +++ b/rbi/stripe/resources/topup.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # To top up your Stripe balance, you create a top-up object. You can retrieve # individual top-ups, as well as list all top-ups. Top-ups are identified by a diff --git a/rbi/stripe/resources/transfer.rbi b/rbi/stripe/resources/transfer.rbi index c07fd065e..40b84eadf 100644 --- a/rbi/stripe/resources/transfer.rbi +++ b/rbi/stripe/resources/transfer.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A `Transfer` object is created when you move funds between Stripe accounts as # part of Connect. diff --git a/rbi/stripe/resources/treasury/credit_reversal.rbi b/rbi/stripe/resources/treasury/credit_reversal.rbi index 561f22e1a..973ec06af 100644 --- a/rbi/stripe/resources/treasury/credit_reversal.rbi +++ b/rbi/stripe/resources/treasury/credit_reversal.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. diff --git a/rbi/stripe/resources/treasury/debit_reversal.rbi b/rbi/stripe/resources/treasury/debit_reversal.rbi index 640b24fe2..d611cf1df 100644 --- a/rbi/stripe/resources/treasury/debit_reversal.rbi +++ b/rbi/stripe/resources/treasury/debit_reversal.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi index 144dcb3d0..eff745d44 100644 --- a/rbi/stripe/resources/treasury/financial_account.rbi +++ b/rbi/stripe/resources/treasury/financial_account.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. diff --git a/rbi/stripe/resources/treasury/financial_account_features.rbi b/rbi/stripe/resources/treasury/financial_account_features.rbi index 4b6578ea5..672124d22 100644 --- a/rbi/stripe/resources/treasury/financial_account_features.rbi +++ b/rbi/stripe/resources/treasury/financial_account_features.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. diff --git a/rbi/stripe/resources/treasury/inbound_transfer.rbi b/rbi/stripe/resources/treasury/inbound_transfer.rbi index 9aa507d17..694cf5077 100644 --- a/rbi/stripe/resources/treasury/inbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/inbound_transfer.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. diff --git a/rbi/stripe/resources/treasury/outbound_payment.rbi b/rbi/stripe/resources/treasury/outbound_payment.rbi index 4d3bacaca..6fdd0acb1 100644 --- a/rbi/stripe/resources/treasury/outbound_payment.rbi +++ b/rbi/stripe/resources/treasury/outbound_payment.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). diff --git a/rbi/stripe/resources/treasury/outbound_transfer.rbi b/rbi/stripe/resources/treasury/outbound_transfer.rbi index 1a0b477d9..fdca99065 100644 --- a/rbi/stripe/resources/treasury/outbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/outbound_transfer.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. diff --git a/rbi/stripe/resources/treasury/received_credit.rbi b/rbi/stripe/resources/treasury/received_credit.rbi index 9e005f9da..a293dafdb 100644 --- a/rbi/stripe/resources/treasury/received_credit.rbi +++ b/rbi/stripe/resources/treasury/received_credit.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. diff --git a/rbi/stripe/resources/treasury/received_debit.rbi b/rbi/stripe/resources/treasury/received_debit.rbi index ea4bdbbb9..acd5e2a18 100644 --- a/rbi/stripe/resources/treasury/received_debit.rbi +++ b/rbi/stripe/resources/treasury/received_debit.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. diff --git a/rbi/stripe/resources/treasury/transaction.rbi b/rbi/stripe/resources/treasury/transaction.rbi index 4cc2ac3dd..68c4c2e71 100644 --- a/rbi/stripe/resources/treasury/transaction.rbi +++ b/rbi/stripe/resources/treasury/transaction.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. diff --git a/rbi/stripe/resources/treasury/transaction_entry.rbi b/rbi/stripe/resources/treasury/transaction_entry.rbi index 4e0bf72b9..0bb3955a5 100644 --- a/rbi/stripe/resources/treasury/transaction_entry.rbi +++ b/rbi/stripe/resources/treasury/transaction_entry.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module Treasury # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). diff --git a/rbi/stripe/resources/usage_record.rbi b/rbi/stripe/resources/usage_record.rbi index c107a0489..19a45b9da 100644 --- a/rbi/stripe/resources/usage_record.rbi +++ b/rbi/stripe/resources/usage_record.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # Usage records allow you to report customer usage and metrics to Stripe for # metered billing of subscription prices. diff --git a/rbi/stripe/resources/usage_record_summary.rbi b/rbi/stripe/resources/usage_record_summary.rbi index cb23d81e8..9524b5741 100644 --- a/rbi/stripe/resources/usage_record_summary.rbi +++ b/rbi/stripe/resources/usage_record_summary.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. class UsageRecordSummary < StripeObject diff --git a/rbi/stripe/resources/v2/billing/meter_event.rbi b/rbi/stripe/resources/v2/billing/meter_event.rbi index 0bee702b4..ae44845c5 100644 --- a/rbi/stripe/resources/v2/billing/meter_event.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module V2 module Billing diff --git a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi index d71e5730e..c58053b98 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module V2 module Billing diff --git a/rbi/stripe/resources/v2/billing/meter_event_session.rbi b/rbi/stripe/resources/v2/billing/meter_event_session.rbi index 5b0fc9c85..4dbab8e6b 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_session.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_session.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module V2 module Billing diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi index 9f02e2366..4b6821920 100644 --- a/rbi/stripe/resources/v2/event.rbi +++ b/rbi/stripe/resources/v2/event.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module V2 class Event < APIResource diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi index f3901fed1..91f97cd28 100644 --- a/rbi/stripe/resources/v2/event_destination.rbi +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe module V2 class EventDestination < APIResource diff --git a/rbi/stripe/resources/webhook_endpoint.rbi b/rbi/stripe/resources/webhook_endpoint.rbi index 25b9a953e..b72d73542 100644 --- a/rbi/stripe/resources/webhook_endpoint.rbi +++ b/rbi/stripe/resources/webhook_endpoint.rbi @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec # frozen_string_literal: true +# typed: true module Stripe # You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be # notified about events that happen in your Stripe account or connected From 1a893c42ab34b2e04552fbf8d125e9db5c0809d2 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 17:36:07 -0500 Subject: [PATCH 05/10] add typed true --- rbi/stripe/resources/v2/amount.rbi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rbi/stripe/resources/v2/amount.rbi b/rbi/stripe/resources/v2/amount.rbi index fafe14e68..e9fe3dca9 100644 --- a/rbi/stripe/resources/v2/amount.rbi +++ b/rbi/stripe/resources/v2/amount.rbi @@ -1,11 +1,13 @@ # frozen_string_literal: true +# typed: true module Stripe module V2 class Amount sig { returns(Integer) } attr_reader :value - sig {returns(String)} + + sig { returns(String) } attr_reader :currency end end From 893914b31dde4d2cb1147834eaf627c8056cf3fb Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 17:42:34 -0500 Subject: [PATCH 06/10] test fix --- lib/stripe/resources/bank_account.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 3b578f13b..180b1d218 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -94,10 +94,12 @@ def self.verify(customer, id, params = {}, opts = {}) end def resource_url - if respond_to?(:customer) + if !customer.nil? "#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}" - elsif respond_to?(:account) + elsif !account.nil? "#{Account.resource_url}/#{CGI.escape(account)}/external_accounts/#{CGI.escape(id)}" + else + raise InvalidRequestError, "Could not determine which URL to request: [account, customer] fields are all null" end end From 9067d780369a14b00c9f0cb502fb5685276594ba Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 17:55:35 -0500 Subject: [PATCH 07/10] fix T.any --- rbi/stripe/resources/event.rbi | 4 ++-- rbi/stripe/resources/payment_intent.rbi | 2 +- rbi/stripe/resources/setup_intent.rbi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi index 0ea7ccaef..390290e2a 100644 --- a/rbi/stripe/resources/event.rbi +++ b/rbi/stripe/resources/event.rbi @@ -35,9 +35,9 @@ module Stripe # for 30 days. class Event < APIResource class Data < Stripe::StripeObject - sig { returns(T::Hash[String, T.any()]) } + sig { returns(T::Hash[String, T.untyped]) } attr_reader :object - sig { returns(T::Hash[String, T.any()]) } + sig { returns(T::Hash[String, T.untyped]) } attr_reader :previous_attributes end class Reason < Stripe::StripeObject diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index d6edd6d96..0b9d5efe1 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -456,7 +456,7 @@ module Stripe attr_reader :swish_handle_redirect_or_display_qr_code sig { returns(String) } attr_reader :type - sig { returns(T::Hash[String, T.any()]) } + sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index 3ff54f8b1..853b4535b 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -96,7 +96,7 @@ module Stripe attr_reader :redirect_to_url sig { returns(String) } attr_reader :type - sig { returns(T::Hash[String, T.any()]) } + sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits From 0e321048734e004c91d6ef0cc87fd721b5e448db Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 19 Nov 2024 23:04:05 -0500 Subject: [PATCH 08/10] Ignore rbis in gem for now --- stripe.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stripe.gemspec b/stripe.gemspec index 874c52484..f5d21eace 100644 --- a/stripe.gemspec +++ b/stripe.gemspec @@ -35,7 +35,8 @@ Gem::Specification.new do |s| /\A\.vscode/, /\Abin/, /\Asorbet/, - /\Atest/ + /\Atest/, + /\Arbi/ ) s.files = `git ls-files`.split("\n").grep_v(ignored) s.bindir = "exe" From b1806c2826889262ccc1c994ed41cc2d955c0ce8 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Thu, 21 Nov 2024 14:42:41 -0500 Subject: [PATCH 09/10] fix docstrings and spaces --- lib/stripe/resources/account.rb | 525 +++++- lib/stripe/resources/account_link.rb | 3 + lib/stripe/resources/account_notice.rb | 23 +- lib/stripe/resources/account_session.rb | 159 +- lib/stripe/resources/apple_pay_domain.rb | 5 + lib/stripe/resources/application.rb | 3 + lib/stripe/resources/application_fee.rb | 21 +- .../resources/application_fee_refund.rb | 7 + lib/stripe/resources/apps/secret.rb | 13 +- lib/stripe/resources/balance.rb | 93 +- lib/stripe/resources/balance_transaction.rb | 25 +- lib/stripe/resources/bank_account.rb | 51 +- lib/stripe/resources/billing/alert.rb | 20 +- .../resources/billing/alert_triggered.rb | 5 + .../billing/credit_balance_summary.rb | 28 +- .../billing/credit_balance_transaction.rb | 46 +- lib/stripe/resources/billing/credit_grant.rb | 26 +- lib/stripe/resources/billing/meter.rb | 20 +- .../resources/billing/meter_error_report.rb | 29 +- lib/stripe/resources/billing/meter_event.rb | 6 + .../billing/meter_event_adjustment.rb | 6 + .../resources/billing/meter_event_summary.rb | 6 + .../resources/billing_portal/configuration.rb | 76 +- .../resources/billing_portal/session.rb | 61 +- lib/stripe/resources/capability.rb | 65 +- .../resources/capital/financing_offer.rb | 43 +- .../resources/capital/financing_summary.rb | 30 +- .../capital/financing_transaction.rb | 32 +- lib/stripe/resources/card.rb | 33 + lib/stripe/resources/cash_balance.rb | 9 +- lib/stripe/resources/charge.rb | 937 ++++++++++- lib/stripe/resources/checkout/session.rb | 834 +++++++++- lib/stripe/resources/climate/order.rb | 44 +- lib/stripe/resources/climate/product.rb | 15 +- lib/stripe/resources/climate/supplier.rb | 17 +- lib/stripe/resources/confirmation_token.rb | 640 +++++++- .../resources/connect_collection_transfer.rb | 5 + lib/stripe/resources/country_spec.rb | 22 +- lib/stripe/resources/coupon.rb | 19 + lib/stripe/resources/credit_note.rb | 85 +- lib/stripe/resources/credit_note_line_item.rb | 41 +- lib/stripe/resources/customer.rb | 98 +- .../resources/customer_balance_transaction.rb | 12 + .../customer_cash_balance_transaction.rb | 63 +- lib/stripe/resources/customer_session.rb | 41 +- lib/stripe/resources/discount.rb | 12 + lib/stripe/resources/dispute.rb | 182 ++- .../entitlements/active_entitlement.rb | 4 + .../active_entitlement_summary.rb | 3 + lib/stripe/resources/entitlements/feature.rb | 6 + lib/stripe/resources/ephemeral_key.rb | 5 + lib/stripe/resources/event.rb | 41 +- lib/stripe/resources/exchange_rate.rb | 2 + lib/stripe/resources/file.rb | 10 + lib/stripe/resources/file_link.rb | 8 + .../financial_connections/account.rb | 81 +- .../account_inferred_balance.rb | 3 + .../financial_connections/account_owner.rb | 7 + .../account_ownership.rb | 3 + .../financial_connections/institution.rb | 20 +- .../financial_connections/session.rb | 30 +- .../financial_connections/transaction.rb | 16 +- lib/stripe/resources/forwarding/request.rb | 39 +- lib/stripe/resources/funding_instructions.rb | 148 +- lib/stripe/resources/gift_cards/card.rb | 30 +- .../resources/gift_cards/transaction.rb | 31 +- .../resources/identity/verification_report.rb | 156 +- .../identity/verification_session.rb | 85 +- lib/stripe/resources/invoice.rb | 424 ++++- lib/stripe/resources/invoice_item.rb | 29 +- lib/stripe/resources/invoice_line_item.rb | 70 +- lib/stripe/resources/invoice_payment.rb | 26 +- .../resources/invoice_rendering_template.rb | 7 + lib/stripe/resources/issuing/authorization.rb | 193 ++- lib/stripe/resources/issuing/card.rb | 121 +- lib/stripe/resources/issuing/cardholder.rb | 87 +- .../issuing/credit_underwriting_record.rb | 64 +- lib/stripe/resources/issuing/dispute.rb | 124 +- .../issuing/dispute_settlement_detail.rb | 10 + .../issuing/fraud_liability_debit.rb | 7 + .../issuing/personalization_design.rb | 31 +- .../resources/issuing/physical_bundle.rb | 13 +- lib/stripe/resources/issuing/settlement.rb | 16 + lib/stripe/resources/issuing/token.rb | 79 +- lib/stripe/resources/issuing/transaction.rb | 156 +- lib/stripe/resources/line_item.rb | 31 +- lib/stripe/resources/login_link.rb | 2 + lib/stripe/resources/mandate.rb | 110 +- lib/stripe/resources/margin.rb | 8 + lib/stripe/resources/order.rb | 425 ++++- .../resources/payment_attempt_record.rb | 100 +- lib/stripe/resources/payment_intent.rb | 1419 +++++++++++++++-- lib/stripe/resources/payment_link.rb | 198 ++- lib/stripe/resources/payment_method.rb | 543 ++++++- .../resources/payment_method_configuration.rb | 605 +++++-- lib/stripe/resources/payment_method_domain.rb | 40 +- lib/stripe/resources/payment_record.rb | 106 +- lib/stripe/resources/payout.rb | 30 +- lib/stripe/resources/person.rb | 198 ++- lib/stripe/resources/plan.rb | 37 +- lib/stripe/resources/price.rb | 94 +- lib/stripe/resources/product.rb | 45 +- lib/stripe/resources/product_feature.rb | 4 + lib/stripe/resources/promotion_code.rb | 22 +- lib/stripe/resources/quote.rb | 389 ++++- lib/stripe/resources/quote_line.rb | 189 ++- lib/stripe/resources/quote_preview_invoice.rb | 426 ++++- .../quote_preview_subscription_schedule.rb | 265 ++- .../resources/radar/early_fraud_warning.rb | 7 + lib/stripe/resources/radar/value_list.rb | 10 + lib/stripe/resources/radar/value_list_item.rb | 7 + lib/stripe/resources/refund.rb | 174 +- lib/stripe/resources/reporting/report_run.rb | 26 +- lib/stripe/resources/reporting/report_type.rb | 8 + lib/stripe/resources/reserve_transaction.rb | 4 + lib/stripe/resources/reversal.rb | 9 + lib/stripe/resources/review.rb | 33 +- lib/stripe/resources/setup_attempt.rb | 253 ++- lib/stripe/resources/setup_intent.rb | 252 ++- lib/stripe/resources/shipping_rate.rb | 38 +- .../resources/sigma/scheduled_query_run.rb | 11 + lib/stripe/resources/source.rb | 540 ++++++- .../resources/source_mandate_notification.rb | 20 +- lib/stripe/resources/source_transaction.rb | 60 +- lib/stripe/resources/subscription.rb | 214 ++- lib/stripe/resources/subscription_item.rb | 18 +- lib/stripe/resources/subscription_schedule.rb | 257 ++- lib/stripe/resources/tax/association.rb | 32 +- lib/stripe/resources/tax/calculation.rb | 128 +- .../resources/tax/calculation_line_item.rb | 39 +- lib/stripe/resources/tax/form.rb | 64 +- lib/stripe/resources/tax/registration.rb | 366 ++++- lib/stripe/resources/tax/settings.rb | 30 +- lib/stripe/resources/tax/transaction.rb | 101 +- .../resources/tax/transaction_line_item.rb | 13 + lib/stripe/resources/tax_code.rb | 3 + .../resources/tax_deducted_at_source.rb | 4 + lib/stripe/resources/tax_id.rb | 26 +- lib/stripe/resources/tax_rate.rb | 22 +- .../resources/terminal/configuration.rb | 156 +- .../resources/terminal/connection_token.rb | 2 + lib/stripe/resources/terminal/location.rb | 20 +- lib/stripe/resources/terminal/reader.rb | 188 ++- .../terminal/reader_collected_data.rb | 6 + .../resources/test_helpers/test_clock.rb | 11 + lib/stripe/resources/token.rb | 8 + lib/stripe/resources/topup.rb | 15 + lib/stripe/resources/transfer.rb | 16 + .../resources/treasury/credit_reversal.rb | 14 + .../resources/treasury/debit_reversal.rb | 16 + .../resources/treasury/financial_account.rb | 48 +- .../treasury/financial_account_features.rb | 147 +- .../resources/treasury/inbound_transfer.rb | 72 +- .../resources/treasury/outbound_payment.rb | 106 +- .../resources/treasury/outbound_transfer.rb | 99 +- .../resources/treasury/received_credit.rb | 105 +- .../resources/treasury/received_debit.rb | 85 +- lib/stripe/resources/treasury/transaction.rb | 59 +- .../resources/treasury/transaction_entry.rb | 52 +- lib/stripe/resources/usage_record.rb | 5 + lib/stripe/resources/usage_record_summary.rb | 11 +- .../resources/v2/billing/meter_event.rb | 6 + .../v2/billing/meter_event_adjustment.rb | 8 + .../v2/billing/meter_event_session.rb | 5 + lib/stripe/resources/v2/event.rb | 16 +- lib/stripe/resources/v2/event_destination.rb | 30 +- lib/stripe/resources/webhook_endpoint.rb | 12 + rbi/stripe/resources/account.rbi | 311 +++- rbi/stripe/resources/account_link.rbi | 11 +- rbi/stripe/resources/account_notice.rbi | 35 +- rbi/stripe/resources/account_session.rbi | 83 +- rbi/stripe/resources/apple_pay_domain.rbi | 17 +- rbi/stripe/resources/application.rbi | 11 +- rbi/stripe/resources/application_fee.rbi | 47 +- .../resources/application_fee_refund.rbi | 23 +- rbi/stripe/resources/apps/secret.rbi | 28 +- rbi/stripe/resources/balance.rbi | 58 +- rbi/stripe/resources/balance_transaction.rbi | 49 +- rbi/stripe/resources/bank_account.rbi | 73 +- rbi/stripe/resources/billing/alert.rbi | 26 +- .../resources/billing/alert_triggered.rbi | 17 +- .../billing/credit_balance_summary.rbi | 21 +- .../billing/credit_balance_transaction.rbi | 44 +- rbi/stripe/resources/billing/credit_grant.rbi | 50 +- rbi/stripe/resources/billing/meter.rbi | 43 +- .../resources/billing/meter_error_report.rbi | 30 +- rbi/stripe/resources/billing/meter_event.rbi | 20 +- .../billing/meter_event_adjustment.rbi | 18 +- .../resources/billing/meter_event_summary.rbi | 20 +- .../billing_portal/configuration.rbi | 69 +- .../resources/billing_portal/session.rbi | 56 +- rbi/stripe/resources/capability.rbi | 49 +- .../resources/capital/financing_offer.rbi | 62 +- .../resources/capital/financing_summary.rbi | 24 +- .../capital/financing_transaction.rbi | 40 +- rbi/stripe/resources/card.rbi | 99 +- rbi/stripe/resources/cash_balance.rbi | 16 +- rbi/stripe/resources/charge.rbi | 591 ++++++- rbi/stripe/resources/checkout/session.rbi | 664 +++++++- rbi/stripe/resources/climate/order.rbi | 76 +- rbi/stripe/resources/climate/product.rbi | 29 +- rbi/stripe/resources/climate/supplier.rbi | 25 +- rbi/stripe/resources/confirmation_token.rbi | 344 +++- .../resources/connect_collection_transfer.rbi | 17 +- rbi/stripe/resources/country_spec.rbi | 29 +- rbi/stripe/resources/coupon.rbi | 55 +- rbi/stripe/resources/credit_note.rbi | 125 +- .../resources/credit_note_line_item.rbi | 61 +- rbi/stripe/resources/customer.rbi | 121 +- .../customer_balance_transaction.rbi | 38 +- .../customer_cash_balance_transaction.rbi | 68 +- rbi/stripe/resources/customer_session.rbi | 41 +- rbi/stripe/resources/discount.rbi | 38 +- rbi/stripe/resources/dispute.rbi | 132 +- .../entitlements/active_entitlement.rbi | 14 +- .../active_entitlement_summary.rbi | 11 +- rbi/stripe/resources/entitlements/feature.rbi | 20 +- rbi/stripe/resources/ephemeral_key.rbi | 17 +- rbi/stripe/resources/event.rbi | 46 +- rbi/stripe/resources/exchange_rate.rbi | 8 +- rbi/stripe/resources/file.rbi | 32 +- rbi/stripe/resources/file_link.rbi | 26 +- .../financial_connections/account.rbi | 94 +- .../account_inferred_balance.rbi | 11 +- .../financial_connections/account_owner.rbi | 23 +- .../account_ownership.rbi | 11 +- .../financial_connections/institution.rbi | 31 +- .../financial_connections/session.rbi | 50 +- .../financial_connections/transaction.rbi | 37 +- rbi/stripe/resources/forwarding/request.rbi | 44 +- rbi/stripe/resources/funding_instructions.rbi | 80 +- rbi/stripe/resources/gift_cards/card.rbi | 41 +- .../resources/gift_cards/transaction.rbi | 44 +- .../identity/verification_report.rbi | 104 +- .../identity/verification_session.rbi | 85 +- rbi/stripe/resources/invoice.rbi | 440 +++-- rbi/stripe/resources/invoice_item.rbi | 76 +- rbi/stripe/resources/invoice_line_item.rbi | 102 +- rbi/stripe/resources/invoice_payment.rbi | 44 +- .../resources/invoice_rendering_template.rbi | 23 +- .../resources/issuing/authorization.rbi | 162 +- rbi/stripe/resources/issuing/card.rbi | 116 +- rbi/stripe/resources/issuing/cardholder.rbi | 81 +- .../issuing/credit_underwriting_record.rbi | 60 +- rbi/stripe/resources/issuing/dispute.rbi | 89 +- .../issuing/dispute_settlement_detail.rbi | 32 +- .../issuing/fraud_liability_debit.rbi | 23 +- .../issuing/personalization_design.rbi | 46 +- .../resources/issuing/physical_bundle.rbi | 23 +- rbi/stripe/resources/issuing/settlement.rbi | 50 +- rbi/stripe/resources/issuing/token.rbi | 66 +- rbi/stripe/resources/issuing/transaction.rbi | 129 +- rbi/stripe/resources/line_item.rbi | 49 +- rbi/stripe/resources/login_link.rbi | 8 +- rbi/stripe/resources/mandate.rbi | 79 +- rbi/stripe/resources/margin.rbi | 26 +- rbi/stripe/resources/order.rbi | 310 +++- .../resources/payment_attempt_record.rbi | 84 +- rbi/stripe/resources/payment_intent.rbi | 942 ++++++++++- rbi/stripe/resources/payment_link.rbi | 179 ++- rbi/stripe/resources/payment_method.rbi | 417 ++++- .../payment_method_configuration.rbi | 391 ++++- .../resources/payment_method_domain.rbi | 47 +- rbi/stripe/resources/payment_record.rbi | 89 +- rbi/stripe/resources/payout.rbi | 79 +- rbi/stripe/resources/person.rbi | 171 +- rbi/stripe/resources/plan.rbi | 72 +- rbi/stripe/resources/price.rbi | 100 +- rbi/stripe/resources/product.rbi | 73 +- rbi/stripe/resources/product_feature.rbi | 14 +- rbi/stripe/resources/promotion_code.rbi | 43 +- rbi/stripe/resources/quote.rbi | 284 +++- rbi/stripe/resources/quote_line.rbi | 118 +- .../resources/quote_preview_invoice.rbi | 428 ++++- .../quote_preview_subscription_schedule.rbi | 175 +- .../resources/radar/early_fraud_warning.rbi | 23 +- rbi/stripe/resources/radar/value_list.rbi | 32 +- .../resources/radar/value_list_item.rbi | 23 +- rbi/stripe/resources/refund.rbi | 128 +- rbi/stripe/resources/reporting/report_run.rbi | 37 +- .../resources/reporting/report_type.rbi | 26 +- rbi/stripe/resources/reserve_transaction.rbi | 14 +- rbi/stripe/resources/reversal.rbi | 29 +- rbi/stripe/resources/review.rbi | 50 +- rbi/stripe/resources/setup_attempt.rbi | 180 ++- rbi/stripe/resources/setup_intent.rbi | 200 ++- rbi/stripe/resources/shipping_rate.rbi | 46 +- .../resources/sigma/scheduled_query_run.rbi | 33 +- rbi/stripe/resources/source.rbi | 353 +++- .../resources/source_mandate_notification.rbi | 40 +- rbi/stripe/resources/source_transaction.rbi | 62 +- rbi/stripe/resources/subscription.rbi | 217 ++- rbi/stripe/resources/subscription_item.rbi | 41 +- .../resources/subscription_schedule.rbi | 169 +- rbi/stripe/resources/tax/association.rbi | 29 +- rbi/stripe/resources/tax/calculation.rbi | 96 +- .../resources/tax/calculation_line_item.rbi | 45 +- rbi/stripe/resources/tax/form.rbi | 69 +- rbi/stripe/resources/tax/registration.rbi | 221 ++- rbi/stripe/resources/tax/settings.rbi | 29 +- rbi/stripe/resources/tax/transaction.rbi | 87 +- .../resources/tax/transaction_line_item.rbi | 39 +- rbi/stripe/resources/tax_code.rbi | 11 +- .../resources/tax_deducted_at_source.rbi | 14 +- rbi/stripe/resources/tax_id.rbi | 39 +- rbi/stripe/resources/tax_rate.rbi | 55 +- .../resources/terminal/configuration.rbi | 101 +- .../resources/terminal/connection_token.rbi | 8 +- rbi/stripe/resources/terminal/location.rbi | 29 +- rbi/stripe/resources/terminal/reader.rbi | 124 +- .../terminal/reader_collected_data.rbi | 18 +- .../resources/test_helpers/test_clock.rbi | 31 +- rbi/stripe/resources/token.rbi | 26 +- rbi/stripe/resources/topup.rbi | 47 +- rbi/stripe/resources/transfer.rbi | 50 +- .../resources/treasury/credit_reversal.rbi | 42 +- .../resources/treasury/debit_reversal.rbi | 46 +- .../resources/treasury/financial_account.rbi | 65 +- .../treasury/financial_account_features.rbi | 84 +- .../resources/treasury/inbound_transfer.rbi | 84 +- .../resources/treasury/outbound_payment.rbi | 103 +- .../resources/treasury/outbound_transfer.rbi | 98 +- .../resources/treasury/received_credit.rbi | 96 +- .../resources/treasury/received_debit.rbi | 81 +- rbi/stripe/resources/treasury/transaction.rbi | 72 +- .../resources/treasury/transaction_entry.rbi | 64 +- rbi/stripe/resources/usage_record.rbi | 17 +- rbi/stripe/resources/usage_record_summary.rbi | 22 +- .../resources/v2/billing/meter_event.rbi | 20 +- .../v2/billing/meter_event_adjustment.rbi | 24 +- .../v2/billing/meter_event_session.rbi | 17 +- rbi/stripe/resources/v2/event.rbi | 24 +- rbi/stripe/resources/v2/event_destination.rbi | 57 +- rbi/stripe/resources/webhook_endpoint.rbi | 38 +- 334 files changed, 26598 insertions(+), 3894 deletions(-) diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 0312b7dad..716ccaf76 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -36,231 +36,682 @@ def self.object_name class BusinessProfile < Stripe::StripeObject class AnnualRevenue < Stripe::StripeObject - attr_reader :amount, :currency, :fiscal_year_end + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + attr_reader :fiscal_year_end end class MonthlyEstimatedRevenue < Stripe::StripeObject - attr_reader :amount, :currency + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency end class SupportAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state - end - attr_reader :annual_revenue, :estimated_worker_count, :mcc, :monthly_estimated_revenue, :name, :product_description, :support_address, :support_email, :support_phone, :support_url, :url + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # The applicant's gross annual revenue for its preceding fiscal year. + attr_reader :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + attr_reader :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + attr_reader :mcc + # Attribute for field monthly_estimated_revenue + attr_reader :monthly_estimated_revenue + # The customer-facing business name. + attr_reader :name + # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + attr_reader :product_description + # A publicly available mailing address for sending support issues to. + attr_reader :support_address + # A publicly available email address for sending support issues to. + attr_reader :support_email + # A publicly available phone number to call with support issues. + attr_reader :support_phone + # A publicly available website for handling support issues. + attr_reader :support_url + # The business's publicly available website. + attr_reader :url end class Capabilities < Stripe::StripeObject - attr_reader :acss_debit_payments, :affirm_payments, :afterpay_clearpay_payments, :alma_payments, :amazon_pay_payments, :au_becs_debit_payments, :bacs_debit_payments, :bancontact_payments, :bank_transfer_payments, :blik_payments, :boleto_payments, :card_issuing, :card_payments, :cartes_bancaires_payments, :cashapp_payments, :eps_payments, :fpx_payments, :gb_bank_transfer_payments, :giropay_payments, :gopay_payments, :grabpay_payments, :id_bank_transfer_payments, :id_bank_transfer_payments_bca, :ideal_payments, :india_international_payments, :jcb_payments, :jp_bank_transfer_payments, :kakao_pay_payments, :klarna_payments, :konbini_payments, :kr_card_payments, :legacy_payments, :link_payments, :mb_way_payments, :mobilepay_payments, :multibanco_payments, :mx_bank_transfer_payments, :naver_pay_payments, :oxxo_payments, :p24_payments, :payco_payments, :paynow_payments, :paypal_payments, :payto_payments, :promptpay_payments, :qris_payments, :rechnung_payments, :revolut_pay_payments, :samsung_pay_payments, :sepa_bank_transfer_payments, :sepa_debit_payments, :shopeepay_payments, :sofort_payments, :swish_payments, :tax_reporting_us_1099_k, :tax_reporting_us_1099_misc, :transfers, :treasury, :treasury_evolve, :treasury_fifth_third, :treasury_goldman_sachs, :twint_payments, :us_bank_account_ach_payments, :us_bank_transfer_payments, :zip_payments + # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + attr_reader :acss_debit_payments + # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + attr_reader :affirm_payments + # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + attr_reader :afterpay_clearpay_payments + # The status of the Alma capability of the account, or whether the account can directly process Alma payments. + attr_reader :alma_payments + # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + attr_reader :amazon_pay_payments + # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + attr_reader :au_becs_debit_payments + # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + attr_reader :bacs_debit_payments + # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + attr_reader :bancontact_payments + # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + attr_reader :bank_transfer_payments + # The status of the blik payments capability of the account, or whether the account can directly process blik charges. + attr_reader :blik_payments + # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + attr_reader :boleto_payments + # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + attr_reader :card_issuing + # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + attr_reader :card_payments + # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + attr_reader :cartes_bancaires_payments + # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. + attr_reader :cashapp_payments + # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + attr_reader :eps_payments + # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + attr_reader :fpx_payments + # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + attr_reader :gb_bank_transfer_payments + # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + attr_reader :giropay_payments + # The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. + attr_reader :gopay_payments + # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + attr_reader :grabpay_payments + # The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. + attr_reader :id_bank_transfer_payments + # The status of Bank BCA onboarding of the account. + attr_reader :id_bank_transfer_payments_bca + # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + attr_reader :ideal_payments + # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. + attr_reader :india_international_payments + # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + attr_reader :jcb_payments + # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + attr_reader :jp_bank_transfer_payments + # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + attr_reader :kakao_pay_payments + # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + attr_reader :klarna_payments + # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + attr_reader :konbini_payments + # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + attr_reader :kr_card_payments + # The status of the legacy payments capability of the account. + attr_reader :legacy_payments + # The status of the link_payments capability of the account, or whether the account can directly process Link charges. + attr_reader :link_payments + # The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. + attr_reader :mb_way_payments + # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. + attr_reader :mobilepay_payments + # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + attr_reader :multibanco_payments + # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + attr_reader :mx_bank_transfer_payments + # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + attr_reader :naver_pay_payments + # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + attr_reader :oxxo_payments + # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + attr_reader :p24_payments + # The status of the Payco capability of the account, or whether the account can directly process Payco payments. + attr_reader :payco_payments + # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + attr_reader :paynow_payments + # The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. + attr_reader :paypal_payments + # The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. + attr_reader :payto_payments + # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + attr_reader :promptpay_payments + # The status of the Qris capability of the account, or whether the account can directly process Qris payments. + attr_reader :qris_payments + # The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. + attr_reader :rechnung_payments + # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. + attr_reader :revolut_pay_payments + # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + attr_reader :samsung_pay_payments + # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + attr_reader :sepa_bank_transfer_payments + # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + attr_reader :sepa_debit_payments + # The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. + attr_reader :shopeepay_payments + # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + attr_reader :sofort_payments + # The status of the Swish capability of the account, or whether the account can directly process Swish payments. + attr_reader :swish_payments + # The status of the tax reporting 1099-K (US) capability of the account. + attr_reader :tax_reporting_us_1099_k + # The status of the tax reporting 1099-MISC (US) capability of the account. + attr_reader :tax_reporting_us_1099_misc + # The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + attr_reader :transfers + # The status of the banking capability, or whether the account can have bank accounts. + attr_reader :treasury + # The status of the treasury_evolve capability of the account. + attr_reader :treasury_evolve + # The status of the treasury_fifth_third capability of the account. + attr_reader :treasury_fifth_third + # The status of the treasury_goldman_sachs capability of the account. + attr_reader :treasury_goldman_sachs + # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + attr_reader :twint_payments + # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + attr_reader :us_bank_account_ach_payments + # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + attr_reader :us_bank_transfer_payments + # The status of the Zip capability of the account, or whether the account can directly process Zip charges. + attr_reader :zip_payments end class Company < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class AddressKana < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class AddressKanji < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class OwnershipDeclaration < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_reader :date + # The IP address from which the beneficial owner attestation was made. + attr_reader :ip + # The user-agent string from the browser where the beneficial owner attestation was made. + attr_reader :user_agent end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :back, :details, :details_code, :front + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. + attr_reader :back + # A user-displayable string describing the verification state of this document. + attr_reader :details + # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. + attr_reader :details_code + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. + attr_reader :front end + # Attribute for field document attr_reader :document end - attr_reader :address, :address_kana, :address_kanji, :directors_provided, :executives_provided, :export_license_id, :export_purpose_code, :name, :name_kana, :name_kanji, :owners_provided, :ownership_declaration, :phone, :structure, :tax_id_provided, :tax_id_registrar, :vat_id_provided, :verification + # Attribute for field address + attr_reader :address + # The Kana variation of the company's primary address (Japan only). + attr_reader :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_reader :address_kanji + # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). + attr_reader :directors_provided + # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. + attr_reader :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_reader :export_license_id + # The purpose code to use for export transactions (India only). + attr_reader :export_purpose_code + # The company's legal name. + attr_reader :name + # The Kana variation of the company's legal name (Japan only). + attr_reader :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_reader :name_kanji + # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). + attr_reader :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_reader :ownership_declaration + # The company's phone number (used for verification). + attr_reader :phone + # The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + attr_reader :structure + # Whether the company's business ID number was provided. + attr_reader :tax_id_provided + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_reader :tax_id_registrar + # Whether the company's business VAT number was provided. + attr_reader :vat_id_provided + # Information on the verification state of the company. + attr_reader :verification end class Controller < Stripe::StripeObject class Application < Stripe::StripeObject - attr_reader :loss_liable, :onboarding_owner, :pricing_controls + # `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. + attr_reader :loss_liable + # `true` if the Connect application is responsible for onboarding the account. + attr_reader :onboarding_owner + # `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. + attr_reader :pricing_controls end class Dashboard < Stripe::StripeObject + # Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). attr_reader :type end class Fees < Stripe::StripeObject + # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). attr_reader :payer end class Losses < Stripe::StripeObject + # A value indicating who is liable when this account can't pay back negative balances from payments. attr_reader :payments end class StripeDashboard < Stripe::StripeObject + # A value indicating the Stripe dashboard this account has access to independent of the Connect application. attr_reader :type end - attr_reader :application, :dashboard, :fees, :is_controller, :losses, :requirement_collection, :stripe_dashboard, :type + # Attribute for field application + attr_reader :application + # Attribute for field dashboard + attr_reader :dashboard + # Attribute for field fees + attr_reader :fees + # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. + attr_reader :is_controller + # Attribute for field losses + attr_reader :losses + # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. + attr_reader :requirement_collection + # Attribute for field stripe_dashboard + attr_reader :stripe_dashboard + # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + attr_reader :type end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement - end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement + end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`. + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Groups < Stripe::StripeObject + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. attr_reader :payments_pricing end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement - end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement + end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class RiskControls < Stripe::StripeObject class Charges < Stripe::StripeObject + # Whether a pause of the risk control has been requested. attr_reader :pause_requested end class Payouts < Stripe::StripeObject + # Whether a pause of the risk control has been requested. attr_reader :pause_requested end - attr_reader :charges, :payouts + # Attribute for field charges + attr_reader :charges + # Attribute for field payouts + attr_reader :payouts end class Settings < Stripe::StripeObject class BacsDebitPayments < Stripe::StripeObject - attr_reader :display_name, :service_user_number + # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + attr_reader :display_name + # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. + attr_reader :service_user_number end class BankBcaOnboarding < Stripe::StripeObject - attr_reader :account_holder_name, :business_account_number + # Bank BCA business account holder name. + attr_reader :account_holder_name + # Bank BCA business account number. + attr_reader :business_account_number end class Branding < Stripe::StripeObject - attr_reader :icon, :logo, :primary_color, :secondary_color + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + attr_reader :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + attr_reader :logo + # A CSS hex color value representing the primary branding color for this account + attr_reader :primary_color + # A CSS hex color value representing the secondary branding color for this account + attr_reader :secondary_color end class Capital < Stripe::StripeObject - attr_reader :payout_destination, :payout_destination_selector + # Per-currency mapping of user-selected destination accounts used to pay out loans. + attr_reader :payout_destination + # Per-currency mapping of all destination accounts eligible to receive loan payouts. + attr_reader :payout_destination_selector end class CardIssuing < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_reader :date + # The IP address from which the account representative accepted the service agreement. + attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_reader :user_agent end + # Attribute for field tos_acceptance attr_reader :tos_acceptance end class CardPayments < Stripe::StripeObject class DeclineOn < Stripe::StripeObject - attr_reader :avs_failure, :cvc_failure + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + attr_reader :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + attr_reader :cvc_failure end - attr_reader :decline_on, :statement_descriptor_prefix, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji + # Attribute for field decline_on + attr_reader :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + attr_reader :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + attr_reader :statement_descriptor_prefix_kanji end class Dashboard < Stripe::StripeObject - attr_reader :display_name, :timezone + # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. + attr_reader :display_name + # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). + attr_reader :timezone end class Invoices < Stripe::StripeObject + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. attr_reader :default_account_tax_ids end class Payments < Stripe::StripeObject - attr_reader :statement_descriptor, :statement_descriptor_kana, :statement_descriptor_kanji, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + attr_reader :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_kanji + # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_prefix_kanji end class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject - attr_reader :delay_days, :interval, :monthly_anchor, :weekly_anchor + # The number of days charges for the account will be held before being paid out. + attr_reader :delay_days + # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + attr_reader :interval + # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + attr_reader :monthly_anchor + # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. + attr_reader :weekly_anchor end - attr_reader :debit_negative_balances, :schedule, :statement_descriptor + # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + attr_reader :debit_negative_balances + # Attribute for field schedule + attr_reader :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + attr_reader :statement_descriptor end class SepaDebitPayments < Stripe::StripeObject + # SEPA creditor identifier that identifies the company making the payment. attr_reader :creditor_id end class TaxForms < Stripe::StripeObject + # Whether the account opted out of receiving their tax forms by postal delivery. attr_reader :consented_to_paperless_delivery end class Treasury < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_reader :date + # The IP address from which the account representative accepted the service agreement. + attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_reader :user_agent end + # Attribute for field tos_acceptance attr_reader :tos_acceptance end - attr_reader :bacs_debit_payments, :bank_bca_onboarding, :branding, :capital, :card_issuing, :card_payments, :dashboard, :invoices, :payments, :payouts, :sepa_debit_payments, :tax_forms, :treasury + # Attribute for field bacs_debit_payments + attr_reader :bacs_debit_payments + # Attribute for field bank_bca_onboarding + attr_reader :bank_bca_onboarding + # Attribute for field branding + attr_reader :branding + # Attribute for field capital + attr_reader :capital + # Attribute for field card_issuing + attr_reader :card_issuing + # Attribute for field card_payments + attr_reader :card_payments + # Attribute for field dashboard + attr_reader :dashboard + # Attribute for field invoices + attr_reader :invoices + # Attribute for field payments + attr_reader :payments + # Attribute for field payouts + attr_reader :payouts + # Attribute for field sepa_debit_payments + attr_reader :sepa_debit_payments + # Attribute for field tax_forms + attr_reader :tax_forms + # Attribute for field treasury + attr_reader :treasury end class TosAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :service_agreement, :user_agent + # The Unix timestamp marking when the account representative accepted their service agreement + attr_reader :date + # The IP address from which the account representative accepted their service agreement + attr_reader :ip + # The user's service agreement type + attr_reader :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement + attr_reader :user_agent end # Business information about the account. attr_reader :business_profile + # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :business_type + # Attribute for field capabilities attr_reader :capabilities + # Whether the account can process charges. attr_reader :charges_enabled + # Attribute for field company attr_reader :company + # Attribute for field controller attr_reader :controller + # The account's country. attr_reader :country + # Time at which the account was connected. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). attr_reader :default_currency + # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. attr_reader :details_submitted + # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. attr_reader :email + # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. attr_reader :external_accounts + # Attribute for field future_requirements attr_reader :future_requirements + # The groups associated with the account. attr_reader :groups + # Unique identifier for the object. attr_reader :id + # This is an object representing a person associated with a Stripe account. # # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. # # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). attr_reader :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Whether the funds in this account can be paid out. attr_reader :payouts_enabled + # Attribute for field requirements attr_reader :requirements + # Attribute for field risk_controls attr_reader :risk_controls + # Options for customizing how the account functions within Stripe. attr_reader :settings + # Attribute for field tos_acceptance attr_reader :tos_acceptance + # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. attr_reader :type + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb index ff0d0a71f..368d81591 100644 --- a/lib/stripe/resources/account_link.rb +++ b/lib/stripe/resources/account_link.rb @@ -16,10 +16,13 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The timestamp at which this account link will expire. attr_reader :expires_at + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The URL for the account link. attr_reader :url diff --git a/lib/stripe/resources/account_notice.rb b/lib/stripe/resources/account_notice.rb index fe9061dd7..82dfcb57e 100644 --- a/lib/stripe/resources/account_notice.rb +++ b/lib/stripe/resources/account_notice.rb @@ -15,30 +15,49 @@ def self.object_name end class Email < Stripe::StripeObject - attr_reader :plain_text, :recipient, :subject + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + attr_reader :plain_text + # Email address of the recipient. + attr_reader :recipient + # Subject of the email. + attr_reader :subject end class LinkedObjects < Stripe::StripeObject - attr_reader :capability, :issuing_credit_underwriting_record, :issuing_dispute + # Associated [Capability](https://stripe.com/docs/api/capabilities) + attr_reader :capability + # Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) + attr_reader :issuing_credit_underwriting_record + # Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) + attr_reader :issuing_dispute end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # When present, the deadline for sending the notice to meet the relevant regulations. attr_reader :deadline + # Information about the email when sent. attr_reader :email + # Unique identifier for the object. attr_reader :id + # Information about objects related to the notice. attr_reader :linked_objects + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. attr_reader :reason + # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. attr_reader :sent_at diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index f01411839..32f187e1a 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -20,103 +20,218 @@ def self.object_name class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :external_account_collection + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :external_account_collection + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :standard_payouts end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class CapitalFinancing < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class CapitalFinancingApplication < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class CapitalFinancingPromotion < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Documents < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :external_account_collection + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_reader :refund_management end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Payments < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_reader :refund_management end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :standard_payouts end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class PayoutsList < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class TaxRegistrations < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class TaxSettings < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end - attr_reader :account_management, :account_onboarding, :balances, :capital_financing, :capital_financing_application, :capital_financing_promotion, :documents, :notification_banner, :payment_details, :payments, :payouts, :payouts_list, :tax_registrations, :tax_settings + # Attribute for field account_management + attr_reader :account_management + # Attribute for field account_onboarding + attr_reader :account_onboarding + # Attribute for field balances + attr_reader :balances + # Attribute for field capital_financing + attr_reader :capital_financing + # Attribute for field capital_financing_application + attr_reader :capital_financing_application + # Attribute for field capital_financing_promotion + attr_reader :capital_financing_promotion + # Attribute for field documents + attr_reader :documents + # Attribute for field notification_banner + attr_reader :notification_banner + # Attribute for field payment_details + attr_reader :payment_details + # Attribute for field payments + attr_reader :payments + # Attribute for field payouts + attr_reader :payouts + # Attribute for field payouts_list + attr_reader :payouts_list + # Attribute for field tax_registrations + attr_reader :tax_registrations + # Attribute for field tax_settings + attr_reader :tax_settings end # The ID of the account the AccountSession was created for attr_reader :account + # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. # # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. attr_reader :client_secret + # Attribute for field components attr_reader :components + # The timestamp at which this AccountSession will expire. attr_reader :expires_at + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/apple_pay_domain.rb b/lib/stripe/resources/apple_pay_domain.rb index 72e69dc1a..9591dd34d 100644 --- a/lib/stripe/resources/apple_pay_domain.rb +++ b/lib/stripe/resources/apple_pay_domain.rb @@ -15,14 +15,19 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Attribute for field domain_name attr_reader :domain_name + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/application.rb b/lib/stripe/resources/application.rb index 1e97598e2..22c9d820c 100644 --- a/lib/stripe/resources/application.rb +++ b/lib/stripe/resources/application.rb @@ -10,10 +10,13 @@ def self.object_name # Unique identifier for the object. attr_reader :id + # The name of the application. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Always true for a deleted object attr_reader :deleted end diff --git a/lib/stripe/resources/application_fee.rb b/lib/stripe/resources/application_fee.rb index 1aeb9b833..b7f89da17 100644 --- a/lib/stripe/resources/application_fee.rb +++ b/lib/stripe/resources/application_fee.rb @@ -14,36 +14,55 @@ def self.object_name nested_resource_class_methods :refund, operations: %i[create retrieve update list] class FeeSource < Stripe::StripeObject - attr_reader :charge, :payout, :type + # Charge ID that created this application fee. + attr_reader :charge + # Payout ID that created this application fee. + attr_reader :payout + # Type of object that created the application fee, either `charge` or `payout`. + attr_reader :type end # ID of the Stripe account this fee was taken from. attr_reader :account + # Amount earned, in cents (or local equivalent). attr_reader :amount + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) attr_reader :amount_refunded + # ID of the Connect application that earned the fee. attr_reader :application + # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). attr_reader :balance_transaction + # ID of the charge that the application fee was taken from. attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. attr_reader :fee_source + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. attr_reader :originating_transaction + # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. attr_reader :refunded + # A list of refunds that have been applied to the fee. attr_reader :refunds diff --git a/lib/stripe/resources/application_fee_refund.rb b/lib/stripe/resources/application_fee_refund.rb index 1878dd6f5..ef38db767 100644 --- a/lib/stripe/resources/application_fee_refund.rb +++ b/lib/stripe/resources/application_fee_refund.rb @@ -17,18 +17,25 @@ def self.object_name # Amount, in cents (or local equivalent). attr_reader :amount + # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # ID of the application fee that was refunded. attr_reader :fee + # Unique identifier for the object. attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb index 22c3c44fe..d6feca9a7 100644 --- a/lib/stripe/resources/apps/secret.rb +++ b/lib/stripe/resources/apps/secret.rb @@ -22,24 +22,35 @@ def self.object_name end class Scope < Stripe::StripeObject - attr_reader :type, :user + # The secret scope type. + attr_reader :type + # The user ID, if type is set to "user" + attr_reader :user end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # If true, indicates that this secret has been deleted attr_reader :deleted + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. attr_reader :expires_at + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # A name for the secret that's unique within the scope. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The plaintext secret value to be stored. attr_reader :payload + # Attribute for field scope attr_reader :scope diff --git a/lib/stripe/resources/balance.rb b/lib/stripe/resources/balance.rb index 34817c27c..db95d9cad 100644 --- a/lib/stripe/resources/balance.rb +++ b/lib/stripe/resources/balance.rb @@ -21,60 +21,129 @@ def self.object_name class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end class ConnectReserved < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end class InstantAvailable < Stripe::StripeObject class NetAvailable < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :destination, :source_types + # Net balance amount, subtracting fees from platform-set pricing. + attr_reader :amount + # ID of the external account for this net balance (not expandable). + attr_reader :destination + # Attribute for field source_types + attr_reader :source_types end class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :net_available, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Breakdown of balance by destination. + attr_reader :net_available + # Attribute for field source_types + attr_reader :source_types end class Issuing < Stripe::StripeObject class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end + # Funds that are available for use. attr_reader :available end class Pending < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. attr_reader :available + # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. attr_reader :connect_reserved + # Funds that you can pay out using Instant Payouts. attr_reader :instant_available + # Attribute for field issuing attr_reader :issuing + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. attr_reader :pending end diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb index 61b0751cb..f621a5694 100644 --- a/lib/stripe/resources/balance_transaction.rb +++ b/lib/stripe/resources/balance_transaction.rb @@ -15,36 +15,59 @@ def self.object_name end class FeeDetail < Stripe::StripeObject - attr_reader :amount, :application, :currency, :description, :type + # Amount of the fee, in cents. + attr_reader :amount + # ID of the Connect application that earned the fee. + attr_reader :application + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. + attr_reader :type end # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. attr_reader :amount + # The date that the transaction's net funds become available in the Stripe balance. attr_reader :available_on + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. attr_reader :exchange_rate + # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. attr_reader :fee + # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. attr_reader :fee_details + # Unique identifier for the object. attr_reader :id + # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` attr_reader :net + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. attr_reader :reporting_category + # This transaction relates to the Stripe object. attr_reader :source + # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. attr_reader :status + # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. attr_reader :type diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 180b1d218..babead1f1 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -21,57 +21,100 @@ def self.object_name class FutureRequirements < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :currently_due, :errors, :past_due, :pending_verification + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :currently_due, :errors, :past_due, :pending_verification + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end # The ID of the account that the bank account is associated with. attr_reader :account + # The name of the person or business that owns the bank account. attr_reader :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. attr_reader :account_holder_type + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. attr_reader :account_type + # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. attr_reader :available_payout_methods + # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). attr_reader :bank_name + # Two-letter ISO code representing the country the bank account is located in. attr_reader :country + # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. attr_reader :currency + # The ID of the customer that the bank account is associated with. attr_reader :customer + # Whether this bank account is the default external account for its currency. attr_reader :default_for_currency + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. attr_reader :fingerprint + # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. attr_reader :future_requirements + # Unique identifier for the object. attr_reader :id + # The last four digits of the bank account number. attr_reader :last4 + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Information about the requirements for the bank account, including what information needs to be collected. attr_reader :requirements + # The routing transit number for the bank account. attr_reader :routing_number + # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. # # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. attr_reader :status + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb index e2e9a8b67..80e07a356 100644 --- a/lib/stripe/resources/billing/alert.rb +++ b/lib/stripe/resources/billing/alert.rb @@ -15,22 +15,38 @@ def self.object_name class UsageThreshold < Stripe::StripeObject class Filter < Stripe::StripeObject - attr_reader :customer, :type + # Limit the scope of the alert to this customer ID + attr_reader :customer + # Attribute for field type + attr_reader :type end - attr_reader :filters, :gte, :meter, :recurrence + # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. + attr_reader :filters + # The value at which this alert will trigger. + attr_reader :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + attr_reader :meter + # Defines how the alert will behave. + attr_reader :recurrence end # Defines the type of the alert. attr_reader :alert_type + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Status of the alert. This can be active, inactive or archived. attr_reader :status + # Title of the alert. attr_reader :title + # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). attr_reader :usage_threshold diff --git a/lib/stripe/resources/billing/alert_triggered.rb b/lib/stripe/resources/billing/alert_triggered.rb index e89df9388..dae67e1b0 100644 --- a/lib/stripe/resources/billing/alert_triggered.rb +++ b/lib/stripe/resources/billing/alert_triggered.rb @@ -11,14 +11,19 @@ def self.object_name # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. attr_reader :alert + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # ID of customer for which the alert triggered attr_reader :customer + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The value triggering the alert attr_reader :value end diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb index f3684f8dd..ce61e18ca 100644 --- a/lib/stripe/resources/billing/credit_balance_summary.rb +++ b/lib/stripe/resources/billing/credit_balance_summary.rb @@ -13,25 +13,43 @@ def self.object_name class Balance < Stripe::StripeObject class AvailableBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class LedgerBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end - attr_reader :available_balance, :ledger_balance + # Attribute for field available_balance + attr_reader :available_balance + # Attribute for field ledger_balance + attr_reader :ledger_balance end # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. attr_reader :balances + # The customer the balance is for. attr_reader :customer + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb index 70be62345..840f67067 100644 --- a/lib/stripe/resources/billing/credit_balance_transaction.rb +++ b/lib/stripe/resources/billing/credit_balance_transaction.rb @@ -15,44 +15,76 @@ def self.object_name class Credit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end - attr_reader :amount, :type + # Attribute for field amount + attr_reader :amount + # The type of credit transaction. + attr_reader :type end class Debit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class CreditsApplied < Stripe::StripeObject - attr_reader :invoice, :invoice_line_item + # The invoice to which the billing credits were applied. + attr_reader :invoice + # The invoice line item to which the billing credits were applied. + attr_reader :invoice_line_item end - attr_reader :amount, :credits_applied, :type + # Attribute for field amount + attr_reader :amount + # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. + attr_reader :credits_applied + # The type of debit transaction. + attr_reader :type end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Credit details for this credit balance transaction. Only present if type is `credit`. attr_reader :credit + # The credit grant associated with this credit balance transaction. attr_reader :credit_grant + # Debit details for this credit balance transaction. Only present if type is `debit`. attr_reader :debit + # The effective time of this credit balance transaction. attr_reader :effective_at + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the test clock this credit balance transaction belongs to. attr_reader :test_clock + # The type of credit balance transaction (credit or debit). attr_reader :type diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index 137d2edfe..96e6fb2dc 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -18,45 +18,67 @@ def self.object_name class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class ApplicabilityConfig < Stripe::StripeObject class Scope < Stripe::StripeObject + # The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. attr_reader :price_type end + # Attribute for field scope attr_reader :scope end # Attribute for field amount attr_reader :amount + # Attribute for field applicability_config attr_reader :applicability_config + # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. attr_reader :category + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # ID of the customer receiving the billing credits. attr_reader :customer + # The time when the billing credits become effective—when they're eligible for use. attr_reader :effective_at + # The time when the billing credits expire. If not present, the billing credits don't expire. attr_reader :expires_at + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # A descriptive name shown in dashboard. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the test clock this credit grant belongs to. attr_reader :test_clock + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated + # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. attr_reader :voided_at diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb index 7301d77c4..467dae72d 100644 --- a/lib/stripe/resources/billing/meter.rb +++ b/lib/stripe/resources/billing/meter.rb @@ -22,44 +22,62 @@ def self.object_name resource_plural: "event_summaries" class CustomerMapping < Stripe::StripeObject - attr_reader :event_payload_key, :type + # The key in the meter event payload to use for mapping the event to a customer. + attr_reader :event_payload_key + # The method for mapping a meter event to a customer. + attr_reader :type end class DefaultAggregation < Stripe::StripeObject + # Specifies how events are aggregated. attr_reader :formula end class StatusTransitions < Stripe::StripeObject + # The time the meter was deactivated, if any. Measured in seconds since Unix epoch. attr_reader :deactivated_at end class ValueSettings < Stripe::StripeObject + # The key in the meter event payload to use as the value for this meter. attr_reader :event_payload_key end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Attribute for field customer_mapping attr_reader :customer_mapping + # Attribute for field default_aggregation attr_reader :default_aggregation + # The meter's name. attr_reader :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. attr_reader :event_name + # The time window to pre-aggregate meter events for, if any. attr_reader :event_time_window + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The meter's status. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated + # Attribute for field value_settings attr_reader :value_settings diff --git a/lib/stripe/resources/billing/meter_error_report.rb b/lib/stripe/resources/billing/meter_error_report.rb index 3523ed1bb..90b42650b 100644 --- a/lib/stripe/resources/billing/meter_error_report.rb +++ b/lib/stripe/resources/billing/meter_error_report.rb @@ -13,30 +13,51 @@ class Reason < Stripe::StripeObject class ErrorType < Stripe::StripeObject class SampleError < Stripe::StripeObject class ApiRequest < Stripe::StripeObject - attr_reader :id, :idempotency_key + # Unique identifier for the object. + attr_reader :id + # idempotency_key of the request + attr_reader :idempotency_key end - attr_reader :api_request, :error_message + # Attribute for field api_request + attr_reader :api_request + # message of the error + attr_reader :error_message end + # Attribute for field sample_errors attr_reader :sample_errors end - attr_reader :error_count, :error_types + # The number of errors generated + attr_reader :error_count + # More information about errors + attr_reader :error_types end class RelatedObject < Stripe::StripeObject - attr_reader :id, :object, :url + # Unique identifier for the object. + attr_reader :id + # The type of meter error related object. Should be 'meter' + attr_reader :object + # The url of the meter object + attr_reader :url end # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field reason attr_reader :reason + # The related objects about the error attr_reader :related_object + # Summary of invalid events attr_reader :summary + # Time when validation ended. Measured in seconds since the Unix epoch attr_reader :validation_end + # Time when validation started. Measured in seconds since the Unix epoch attr_reader :validation_start end diff --git a/lib/stripe/resources/billing/meter_event.rb b/lib/stripe/resources/billing/meter_event.rb index 43ebe5782..eb102b29e 100644 --- a/lib/stripe/resources/billing/meter_event.rb +++ b/lib/stripe/resources/billing/meter_event.rb @@ -15,16 +15,22 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name + # A unique identifier for the event. attr_reader :identifier + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). attr_reader :payload + # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. attr_reader :timestamp diff --git a/lib/stripe/resources/billing/meter_event_adjustment.rb b/lib/stripe/resources/billing/meter_event_adjustment.rb index 958c6226f..27675170a 100644 --- a/lib/stripe/resources/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/billing/meter_event_adjustment.rb @@ -13,18 +13,24 @@ def self.object_name end class Cancel < Stripe::StripeObject + # Unique identifier for the event. attr_reader :identifier end # Specifies which event to cancel. attr_reader :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The meter event adjustment's status. attr_reader :status + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. attr_reader :type diff --git a/lib/stripe/resources/billing/meter_event_summary.rb b/lib/stripe/resources/billing/meter_event_summary.rb index 80bdc489a..4e3c6cc0a 100644 --- a/lib/stripe/resources/billing/meter_event_summary.rb +++ b/lib/stripe/resources/billing/meter_event_summary.rb @@ -13,16 +13,22 @@ def self.object_name # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. attr_reader :aggregated_value + # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. attr_reader :end_time + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The meter associated with this event summary. attr_reader :meter + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. attr_reader :start_time end diff --git a/lib/stripe/resources/billing_portal/configuration.rb b/lib/stripe/resources/billing_portal/configuration.rb index 486fdcd23..75234340d 100644 --- a/lib/stripe/resources/billing_portal/configuration.rb +++ b/lib/stripe/resources/billing_portal/configuration.rb @@ -15,72 +15,132 @@ def self.object_name end class BusinessProfile < Stripe::StripeObject - attr_reader :headline, :privacy_policy_url, :terms_of_service_url + # The messaging shown to customers in the portal. + attr_reader :headline + # A link to the business’s publicly available privacy policy. + attr_reader :privacy_policy_url + # A link to the business’s publicly available terms of service. + attr_reader :terms_of_service_url end class Features < Stripe::StripeObject class CustomerUpdate < Stripe::StripeObject - attr_reader :allowed_updates, :enabled + # The types of customer updates that are supported. When empty, customers are not updateable. + attr_reader :allowed_updates + # Whether the feature is enabled. + attr_reader :enabled end class InvoiceHistory < Stripe::StripeObject + # Whether the feature is enabled. attr_reader :enabled end class PaymentMethodUpdate < Stripe::StripeObject + # Whether the feature is enabled. attr_reader :enabled end class SubscriptionCancel < Stripe::StripeObject class CancellationReason < Stripe::StripeObject - attr_reader :enabled, :options + # Whether the feature is enabled. + attr_reader :enabled + # Which cancellation reasons will be given as options to the customer. + attr_reader :options end - attr_reader :cancellation_reason, :enabled, :mode, :proration_behavior + # Attribute for field cancellation_reason + attr_reader :cancellation_reason + # Whether the feature is enabled. + attr_reader :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + attr_reader :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. + attr_reader :proration_behavior end class SubscriptionUpdate < Stripe::StripeObject class Product < Stripe::StripeObject - attr_reader :prices, :product + # The list of price IDs which, when subscribed to, a subscription can be updated. + attr_reader :prices + # The product ID. + attr_reader :product end class ScheduleAtPeriodEnd < Stripe::StripeObject class Condition < Stripe::StripeObject + # The type of condition. attr_reader :type end + # List of conditions. When any condition is true, an update will be scheduled at the end of the current period. attr_reader :conditions end - attr_reader :default_allowed_updates, :enabled, :products, :proration_behavior, :schedule_at_period_end + # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. + attr_reader :default_allowed_updates + # Whether the feature is enabled. + attr_reader :enabled + # The list of up to 10 products that support subscription updates. + attr_reader :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. + attr_reader :proration_behavior + # Attribute for field schedule_at_period_end + attr_reader :schedule_at_period_end end - attr_reader :customer_update, :invoice_history, :payment_method_update, :subscription_cancel, :subscription_update + # Attribute for field customer_update + attr_reader :customer_update + # Attribute for field invoice_history + attr_reader :invoice_history + # Attribute for field payment_method_update + attr_reader :payment_method_update + # Attribute for field subscription_cancel + attr_reader :subscription_cancel + # Attribute for field subscription_update + attr_reader :subscription_update end class LoginPage < Stripe::StripeObject - attr_reader :enabled, :url + # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + # + # If `false`, the previously generated `url`, if any, will be deactivated. + attr_reader :enabled + # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. + attr_reader :url end # Whether the configuration is active and can be used to create portal sessions. attr_reader :active + # ID of the Connect Application that created the configuration. attr_reader :application + # Attribute for field business_profile attr_reader :business_profile + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. attr_reader :default_return_url + # Attribute for field features attr_reader :features + # Unique identifier for the object. attr_reader :id + # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. attr_reader :is_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Attribute for field login_page attr_reader :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated diff --git a/lib/stripe/resources/billing_portal/session.rb b/lib/stripe/resources/billing_portal/session.rb index e8685da57..eedb26d3c 100644 --- a/lib/stripe/resources/billing_portal/session.rb +++ b/lib/stripe/resources/billing_portal/session.rb @@ -28,61 +28,108 @@ def self.object_name class Flow < Stripe::StripeObject class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # A custom message to display to the customer after the flow is completed. attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the flow is completed. attr_reader :return_url end - attr_reader :hosted_confirmation, :redirect, :type + # Configuration when `after_completion.type=hosted_confirmation`. + attr_reader :hosted_confirmation + # Configuration when `after_completion.type=redirect`. + attr_reader :redirect + # The specified type of behavior after the flow is completed. + attr_reader :type end class SubscriptionCancel < Stripe::StripeObject class Retention < Stripe::StripeObject class CouponOffer < Stripe::StripeObject + # The ID of the coupon to be offered. attr_reader :coupon end - attr_reader :coupon_offer, :type + # Configuration when `retention.type=coupon_offer`. + attr_reader :coupon_offer + # Type of retention strategy that will be used. + attr_reader :type end - attr_reader :retention, :subscription + # Specify a retention strategy to be used in the cancellation flow. + attr_reader :retention + # The ID of the subscription to be canceled. + attr_reader :subscription end class SubscriptionUpdate < Stripe::StripeObject + # The ID of the subscription to be updated. attr_reader :subscription end class SubscriptionUpdateConfirm < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :coupon, :promotion_code + # The ID of the coupon to apply to this subscription update. + attr_reader :coupon + # The ID of a promotion code to apply to this subscription update. + attr_reader :promotion_code end class Item < Stripe::StripeObject - attr_reader :id, :price, :quantity + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + attr_reader :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + attr_reader :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + attr_reader :quantity end - attr_reader :discounts, :items, :subscription + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + attr_reader :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + attr_reader :items + # The ID of the subscription to be updated. + attr_reader :subscription end - attr_reader :after_completion, :subscription_cancel, :subscription_update, :subscription_update_confirm, :type + # Attribute for field after_completion + attr_reader :after_completion + # Configuration when `flow.type=subscription_cancel`. + attr_reader :subscription_cancel + # Configuration when `flow.type=subscription_update`. + attr_reader :subscription_update + # Configuration when `flow.type=subscription_update_confirm`. + attr_reader :subscription_update_confirm + # Type of flow that the customer will go through. + attr_reader :type end # The configuration used by this session, describing the features available. attr_reader :configuration + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The ID of the customer for this session. attr_reader :customer + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. attr_reader :flow + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. attr_reader :locale + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. attr_reader :on_behalf_of + # The URL to redirect customers to when they click on the portal's link to return to your website. attr_reader :return_url + # The short-lived URL of the session that gives customers access to the customer portal. attr_reader :url diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb index 6daa7d6df..b57a493d9 100644 --- a/lib/stripe/resources/capability.rb +++ b/lib/stripe/resources/capability.rb @@ -15,39 +15,92 @@ def self.object_name class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. + attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. + attr_reader :currently_due + # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end # The account for which the capability enables functionality. attr_reader :account + # Attribute for field future_requirements attr_reader :future_requirements + # The identifier for the capability. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Whether the capability has been requested. attr_reader :requested + # Time at which the capability was requested. Measured in seconds since the Unix epoch. attr_reader :requested_at + # Attribute for field requirements attr_reader :requirements + # The status of the capability. attr_reader :status diff --git a/lib/stripe/resources/capital/financing_offer.rb b/lib/stripe/resources/capital/financing_offer.rb index 28c5dee5c..a347d4c1b 100644 --- a/lib/stripe/resources/capital/financing_offer.rb +++ b/lib/stripe/resources/capital/financing_offer.rb @@ -14,47 +14,86 @@ def self.object_name end class AcceptedTerms < Stripe::StripeObject - attr_reader :advance_amount, :currency, :fee_amount, :previous_financing_fee_discount_amount, :withhold_rate + # Amount of financing offered, in minor units. + attr_reader :advance_amount + # Currency that the financing offer is transacted in. For example, `usd`. + attr_reader :currency + # Fixed fee amount, in minor units. + attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount amount on remaining premium for the existing loan at payout time. + attr_reader :previous_financing_fee_discount_amount + # Per-transaction rate at which Stripe will withhold funds to repay the financing. + attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject - attr_reader :advance_amount, :campaign_type, :currency, :fee_amount, :previous_financing_fee_discount_rate, :withhold_rate + # Amount of financing offered, in minor units. + attr_reader :advance_amount + # Describes the type of user the offer is being extended to. + attr_reader :campaign_type + # Currency that the financing offer is transacted in. For example, `usd`. + attr_reader :currency + # Fixed fee amount, in minor units. + attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` + # is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate + # and the remaining fee. + attr_reader :previous_financing_fee_discount_rate + # Per-transaction rate at which Stripe will withhold funds to repay the financing. + attr_reader :withhold_rate end # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # the terms accepted by the Connected account, which may differ from those # offered. attr_reader :accepted_terms + # The ID of the merchant associated with this financing object. attr_reader :account + # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. attr_reader :charged_off_at + # Time at which the offer was created. Given in seconds since unix epoch. attr_reader :created + # Time at which the offer expires. Given in seconds since unix epoch. attr_reader :expires_after + # The type of financing being offered. attr_reader :financing_type + # A unique identifier for the financing object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The object type: financing_offer. attr_reader :object + # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # both the terms offered to the Connected account. attr_reader :offered_terms + # Financing product identifier. attr_reader :product_type + # The ID of the financing offer that replaced this offer. attr_reader :replacement + # The ID of the financing offer that this offer is a replacement for. attr_reader :replacement_for + # The current status of the offer. attr_reader :status + # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). attr_reader :type diff --git a/lib/stripe/resources/capital/financing_summary.rb b/lib/stripe/resources/capital/financing_summary.rb index 187fe30e5..dc902a45f 100644 --- a/lib/stripe/resources/capital/financing_summary.rb +++ b/lib/stripe/resources/capital/financing_summary.rb @@ -13,18 +13,44 @@ def self.object_name class Details < Stripe::StripeObject class CurrentRepaymentInterval < Stripe::StripeObject - attr_reader :due_at, :paid_amount, :remaining_amount + # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. + # Given in seconds since unix epoch. + attr_reader :due_at + # The amount that has already been paid in the current repayment interval. + attr_reader :paid_amount + # The amount that is yet to be paid in the current repayment interval. + attr_reader :remaining_amount end - attr_reader :advance_amount, :advance_paid_out_at, :currency, :current_repayment_interval, :fee_amount, :paid_amount, :remaining_amount, :repayments_begin_at, :withhold_rate + # Amount of financing offered, in minor units. + attr_reader :advance_amount + # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. + attr_reader :advance_paid_out_at + # Currency that the financing offer is transacted in. For example, `usd`. + attr_reader :currency + # The chronologically current repayment interval for the financing offer. + attr_reader :current_repayment_interval + # Fixed fee amount, in minor units. + attr_reader :fee_amount + # The amount the Connected account has paid toward the financing debt so far. + attr_reader :paid_amount + # The balance remaining to be paid on the financing, in minor units. + attr_reader :remaining_amount + # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. + attr_reader :repayments_begin_at + # Per-transaction rate at which Stripe will withhold funds to repay the financing. + attr_reader :withhold_rate end # Additional information about the financing summary. Describes currency, advance amount, # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, # repayment start date, and advance payout date. attr_reader :details + # The Financing Offer ID this Financing Summary corresponds to attr_reader :financing_offer + # The object type: financing_summary attr_reader :object + # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. attr_reader :status end diff --git a/lib/stripe/resources/capital/financing_transaction.rb b/lib/stripe/resources/capital/financing_transaction.rb index 77a156cc4..851d1dcbc 100644 --- a/lib/stripe/resources/capital/financing_transaction.rb +++ b/lib/stripe/resources/capital/financing_transaction.rb @@ -14,30 +14,58 @@ def self.object_name class Details < Stripe::StripeObject class Transaction < Stripe::StripeObject - attr_reader :charge, :treasury_transaction + # The linked payment ID. + attr_reader :charge + # The linked Treasury Financing Transaction ID. + attr_reader :treasury_transaction end - attr_reader :advance_amount, :currency, :fee_amount, :linked_payment, :reason, :reversed_transaction, :total_amount, :transaction + # The advance amount being repaid, paid out, or reversed in minor units. + attr_reader :advance_amount + # The currency of the financing transaction. + attr_reader :currency + # The fee amount being repaid, paid out, or reversed in minor units. + attr_reader :fee_amount + # The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. + attr_reader :linked_payment + # The reason for the financing transaction (if applicable). + attr_reader :reason + # The reversed transaction. This field only applies to financing + # transactions of type `reversal`. + attr_reader :reversed_transaction + # The advance and fee amount being repaid, paid out, or reversed in minor units. + attr_reader :total_amount + # This is an object representing a linked transaction on a Capital Financing Transaction. + attr_reader :transaction end # The ID of the merchant associated with this financing transaction. attr_reader :account + # Time at which the financing transaction was created. Given in seconds since unix epoch. attr_reader :created_at + # This is an object representing a transaction on a Capital financing offer. attr_reader :details + # The Capital financing offer for this financing transaction. attr_reader :financing_offer + # A unique identifier for the financing transaction object. attr_reader :id + # The Capital transaction object that predates the Financing Transactions API and # corresponds with the balance transaction that was created as a result of this # financing transaction. attr_reader :legacy_balance_transaction_source + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The object type: financing_transaction attr_reader :object + # The type of the financing transaction. attr_reader :type + # A human-friendly description of the financing transaction. attr_reader :user_facing_description diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb index 4904e6874..20f66d2b9 100644 --- a/lib/stripe/resources/card.rb +++ b/lib/stripe/resources/card.rb @@ -18,74 +18,107 @@ def self.object_name end class Networks < Stripe::StripeObject + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. attr_reader :preferred end # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :account + # City/District/Suburb/Town/Village. attr_reader :address_city + # Billing address country, if provided when creating card. attr_reader :address_country + # Address line 1 (Street address/PO Box/Company name). attr_reader :address_line1 + # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. attr_reader :address_line1_check + # Address line 2 (Apartment/Suite/Unit/Building). attr_reader :address_line2 + # State/County/Province/Region. attr_reader :address_state + # ZIP or postal code. attr_reader :address_zip + # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. attr_reader :address_zip_check + # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. attr_reader :available_payout_methods + # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. attr_reader :country + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :currency + # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. attr_reader :customer + # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). attr_reader :cvc_check + # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :default_for_currency + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) attr_reader :description + # (For tokenized numbers only.) The last four digits of the device account number. attr_reader :dynamic_last4 + # Two-digit number representing the card's expiration month. attr_reader :exp_month + # Four-digit number representing the card's expiration year. attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. # # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. attr_reader :funding + # Unique identifier for the object. attr_reader :id + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) attr_reader :issuer + # The last four digits of the card. attr_reader :last4 + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Cardholder name. attr_reader :name + # Attribute for field networks attr_reader :networks + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. attr_reader :status + # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. attr_reader :tokenization_method + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/cash_balance.rb b/lib/stripe/resources/cash_balance.rb index 6f93dca8a..4aa57ffb2 100644 --- a/lib/stripe/resources/cash_balance.rb +++ b/lib/stripe/resources/cash_balance.rb @@ -10,16 +10,23 @@ def self.object_name end class Settings < Stripe::StripeObject - attr_reader :reconciliation_mode, :using_merchant_default + # The configuration for how funds that land in the customer cash balance are reconciled. + attr_reader :reconciliation_mode + # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + attr_reader :using_merchant_default end # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :available + # The ID of the customer whose cash balance this object represents. attr_reader :customer + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field settings attr_reader :settings diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index 594278b8c..81ecee944 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -22,115 +22,287 @@ def self.object_name class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address. + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name + # Billing phone number (including extension). + attr_reader :phone end class FraudDetails < Stripe::StripeObject - attr_reader :stripe_report, :user_report + # Assessments from Stripe. If set, the value is `fraudulent`. + attr_reader :stripe_report + # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. + attr_reader :user_report end class Level3 < Stripe::StripeObject class LineItem < Stripe::StripeObject - attr_reader :discount_amount, :product_code, :product_description, :quantity, :tax_amount, :unit_cost + # Attribute for field discount_amount + attr_reader :discount_amount + # Attribute for field product_code + attr_reader :product_code + # Attribute for field product_description + attr_reader :product_description + # Attribute for field quantity + attr_reader :quantity + # Attribute for field tax_amount + attr_reader :tax_amount + # Attribute for field unit_cost + attr_reader :unit_cost end - attr_reader :customer_reference, :line_items, :merchant_reference, :shipping_address_zip, :shipping_amount, :shipping_from_zip + # Attribute for field customer_reference + attr_reader :customer_reference + # Attribute for field line_items + attr_reader :line_items + # Attribute for field merchant_reference + attr_reader :merchant_reference + # Attribute for field shipping_address_zip + attr_reader :shipping_address_zip + # Attribute for field shipping_amount + attr_reader :shipping_amount + # Attribute for field shipping_from_zip + attr_reader :shipping_from_zip end class Outcome < Stripe::StripeObject class Rule < Stripe::StripeObject - attr_reader :action, :id, :predicate + # The action taken on the payment. + attr_reader :action + # Unique identifier for the object. + attr_reader :id + # The predicate to evaluate the payment against. + attr_reader :predicate end - attr_reader :network_status, :reason, :risk_level, :risk_score, :rule, :seller_message, :type + # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. + attr_reader :network_status + # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. + attr_reader :reason + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. + attr_reader :risk_level + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. + attr_reader :risk_score + # The ID of the Radar rule that matched the payment, if applicable. + attr_reader :rule + # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. + attr_reader :seller_message + # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. + attr_reader :type end class PaymentMethodDetails < Stripe::StripeObject class AchCreditTransfer < Stripe::StripeObject - attr_reader :account_number, :bank_name, :routing_number, :swift_code + # Account number to transfer funds to. + attr_reader :account_number + # Name of the bank associated with the routing number. + attr_reader :bank_name + # Routing transit number for the bank account to transfer funds to. + attr_reader :routing_number + # SWIFT code of the bank associated with the routing number. + attr_reader :swift_code end class AchDebit < Stripe::StripeObject - attr_reader :account_holder_type, :bank_name, :country, :fingerprint, :last4, :routing_number + # Type of entity that holds the account. This can be either `individual` or `company`. + attr_reader :account_holder_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Routing transit number of the bank account. + attr_reader :routing_number end class AcssDebit < Stripe::StripeObject - attr_reader :bank_name, :fingerprint, :institution_number, :last4, :mandate, :transit_number + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Institution number of the bank account + attr_reader :institution_number + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # Transit number of the bank account. + attr_reader :transit_number end class Affirm < Stripe::StripeObject + # The Affirm transaction ID associated with this payment. attr_reader :transaction_id end class AfterpayClearpay < Stripe::StripeObject - attr_reader :order_id, :reference + # The Afterpay order ID associated with this payment intent. + attr_reader :order_id + # Order identifier shown to the merchant in Afterpay’s online portal. + attr_reader :reference end class Alipay < Stripe::StripeObject - attr_reader :buyer_id, :fingerprint, :transaction_id + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + attr_reader :buyer_id + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + attr_reader :fingerprint + # Transaction ID of this particular Alipay transaction. + attr_reader :transaction_id end class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4, :mandate + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate end class BacsDebit < Stripe::StripeObject - attr_reader :fingerprint, :last4, :mandate, :sort_code + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # Sort code of the bank account. (e.g., `10-20-30`) + attr_reader :sort_code end class Bancontact < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class Blik < Stripe::StripeObject + # A unique and immutable identifier assigned by BLIK to every buyer. attr_reader :buyer_id end class Boleto < Stripe::StripeObject + # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class DecrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the decremental authorization feature is supported. attr_reader :status end class ExtendedAuthorization < Stripe::StripeObject + # Indicates whether or not the capture window is extended beyond the standard authorization. attr_reader :status end class IncrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the incremental authorization feature is supported. attr_reader :status end class Installments < Stripe::StripeObject class Plan < Stripe::StripeObject - attr_reader :count, :interval, :type + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_reader :interval + # Type of installment plan, one of `fixed_count`. + attr_reader :type end + # Installment plan selected for the payment. attr_reader :plan end class Multicapture < Stripe::StripeObject + # Indicates whether or not multiple captures are supported. attr_reader :status end class NetworkToken < Stripe::StripeObject + # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. attr_reader :used end class Overcapture < Stripe::StripeObject - attr_reader :maximum_amount_capturable, :status + # The maximum amount that can be captured. + attr_reader :maximum_amount_capturable + # Indicates whether or not the authorized amount can be over-captured. + attr_reader :status end class ThreeDSecure < Stripe::StripeObject - attr_reader :authentication_flow, :electronic_commerce_indicator, :exemption_indicator, :exemption_indicator_applied, :result, :result_reason, :transaction_id, :version + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. + attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. + attr_reader :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_reader :exemption_indicator + # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + # the outcome of Stripe's internal risk assessment. + attr_reader :exemption_indicator_applied + # Indicates the outcome of 3D Secure authentication. + attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. + attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. + attr_reader :transaction_id + # The version of 3D Secure that was used. + attr_reader :version end class Wallet < Stripe::StripeObject @@ -141,112 +313,431 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end - attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + # Attribute for field amex_express_checkout + attr_reader :amex_express_checkout + # Attribute for field apple_pay + attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field link + attr_reader :link + # Attribute for field masterpass + attr_reader :masterpass + # Attribute for field samsung_pay + attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type + # Attribute for field visa_checkout + attr_reader :visa_checkout end - attr_reader :amount_authorized, :authorization_code, :brand, :capture_before, :checks, :country, :decremental_authorization, :description, :exp_month, :exp_year, :extended_authorization, :fingerprint, :funding, :iin, :incremental_authorization, :installments, :issuer, :last4, :mandate, :moto, :multicapture, :network, :network_token, :overcapture, :three_d_secure, :wallet + # The authorized amount. + attr_reader :amount_authorized + # Authorization code on the charge. + attr_reader :authorization_code + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # Check results by Card networks on Card address and CVC at time of payment. + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Attribute for field decremental_authorization + attr_reader :decremental_authorization + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Attribute for field extended_authorization + attr_reader :extended_authorization + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Attribute for field incremental_authorization + attr_reader :incremental_authorization + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_reader :installments + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # ID of the mandate used to make this payment or created by it. + attr_reader :mandate + # True if this payment was marked as MOTO and out of scope for SCA. + attr_reader :moto + # Attribute for field multicapture + attr_reader :multicapture + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # If this card has network token credentials, this contains the details of the network token credentials. + attr_reader :network_token + # Attribute for field overcapture + attr_reader :overcapture + # Populated if this transaction used 3D Secure authentication. + attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + # The authorized amount + attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Details about payments collected offline. + attr_reader :offline + # Defines whether the authorized amount can be over-captured or not + attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt + # Attribute for field wallet + attr_reader :wallet end class Cashapp < Stripe::StripeObject - attr_reader :buyer_id, :cashtag + # A unique and immutable identifier assigned by Cash App to every buyer. + attr_reader :buyer_id + # A public identifier for buyers using Cash App. + attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - attr_reader :bank, :verified_name + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + attr_reader :bank + # Owner's verified full name. Values are verified or provided by EPS directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # EPS rarely provides this information so the attribute is usually empty. + attr_reader :verified_name end class Fpx < Stripe::StripeObject - attr_reader :account_holder_type, :bank, :transaction_id + # Account holder type, if provided. Can be one of `individual` or `company`. + attr_reader :account_holder_type + # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + attr_reader :bank + # Unique transaction id generated by FPX for every request from the merchant + attr_reader :transaction_id end class Giropay < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # Owner's verified full name. Values are verified or provided by Giropay directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Giropay rarely provides this information so the attribute is usually empty. + attr_reader :verified_name end class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject + # Unique transaction id generated by GrabPay attr_reader :transaction_id end class IdBankTransfer < Stripe::StripeObject - attr_reader :account_number, :bank, :bank_code, :bank_name, :display_name + # Account number of the bank account to transfer funds to. + attr_reader :account_number + # Bank where the account is located. + attr_reader :bank + # Local bank code of the bank. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end - attr_reader :brand, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :issuer, :last4, :network, :network_transaction_id, :preferred_locales, :read_method, :receipt + # Card brand. Can be `interac`, `mastercard` or `visa`. + attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt end class KakaoPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Klarna < Stripe::StripeObject class PayerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # The payer address country attr_reader :country end + # The payer's address attr_reader :address end - attr_reader :payer_details, :payment_method_category, :preferred_locale + # The payer details for this transaction. + attr_reader :payer_details + # The Klarna payment method used for this transaction. + # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + attr_reader :payment_method_category + # Preferred language of the Klarna authorization page that the customer is redirected to. + # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + attr_reader :preferred_locale end class Konbini < Stripe::StripeObject class Store < Stripe::StripeObject + # The name of the convenience store chain where the payment was completed. attr_reader :chain end + # If the payment succeeded, this contains the details of the convenience store where the payment was completed. attr_reader :store end class KrCard < Stripe::StripeObject - attr_reader :brand, :buyer_id, :last4 + # The local credit or debit card brand. + attr_reader :brand + # A unique identifier for the buyer as determined by the local payment processor. + attr_reader :buyer_id + # The last four digits of the card. This may not be present for American Express cards. + attr_reader :last4 end class Link < Stripe::StripeObject + # Two-letter ISO code representing the funding source country beneath the Link payment. + # You could use this attribute to get a sense of international fees. attr_reader :country end @@ -254,59 +745,142 @@ class MbWay < Stripe::StripeObject; end class Mobilepay < Stripe::StripeObject class Card < Stripe::StripeObject - attr_reader :brand, :country, :exp_month, :exp_year, :last4 + # Brand of the card used in the transaction + attr_reader :brand + # Two-letter ISO code representing the country of the card + attr_reader :country + # Two digit number representing the card's expiration month + attr_reader :exp_month + # Two digit number representing the card's expiration year + attr_reader :exp_year + # The last 4 digits of the card + attr_reader :last4 end + # Internal card details attr_reader :card end class Multibanco < Stripe::StripeObject - attr_reader :entity, :reference + # Entity number associated with this Multibanco payment. + attr_reader :entity + # Reference number associated with this Multibanco payment. + attr_reader :reference end class NaverPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Oxxo < Stripe::StripeObject + # OXXO reference number attr_reader :number end class P24 < Stripe::StripeObject - attr_reader :bank, :reference, :verified_name + # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + attr_reader :bank + # Unique reference for this Przelewy24 payment. + attr_reader :reference + # Owner's verified full name. Values are verified or provided by Przelewy24 directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Przelewy24 rarely provides this information so the attribute is usually empty. + attr_reader :verified_name end class Payco < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Paynow < Stripe::StripeObject + # Reference number associated with this PayNow payment attr_reader :reference end class Paypal < Stripe::StripeObject class SellerProtection < Stripe::StripeObject - attr_reader :dispute_categories, :status + # An array of conditions that are covered for the transaction, if applicable. + attr_reader :dispute_categories + # Indicates whether the transaction is eligible for PayPal's seller protection. + attr_reader :status end class Shipping < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class VerifiedAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :payer_email, :payer_id, :payer_name, :seller_protection, :shipping, :transaction_id, :verified_address, :verified_email, :verified_name + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's full name. Values provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_name + # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + attr_reader :seller_protection + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. + attr_reader :shipping + # A unique ID generated by PayPal for this transaction. + attr_reader :transaction_id + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. + attr_reader :verified_address + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email + # Owner's verified full name. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class Payto < Stripe::StripeObject - attr_reader :bsb_number, :last4, :mandate, :pay_id + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The PayID alias for the bank account. + attr_reader :pay_id end class Pix < Stripe::StripeObject + # Unique transaction id generated by BCB attr_reader :bank_transaction_id end class Promptpay < Stripe::StripeObject + # Bill reference generated by PromptPay attr_reader :reference end @@ -315,155 +889,402 @@ class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject; end class SamsungPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class SepaCreditTransfer < Stripe::StripeObject - attr_reader :bank_name, :bic, :iban + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # IBAN of the bank account to transfer funds to. + attr_reader :iban end class SepaDebit < Stripe::StripeObject - attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Branch code of bank associated with the bank account. + attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four characters of the IBAN. + attr_reader :last4 + # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + attr_reader :mandate end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :country, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the SOFORT authorization page that the customer is redirected to. + # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by SOFORT directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class StripeAccount < Stripe::StripeObject; end class Swish < Stripe::StripeObject - attr_reader :fingerprint, :payment_reference, :verified_phone_last4 + # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + attr_reader :fingerprint + # Payer bank reference number for the payment + attr_reader :payment_reference + # The last four digits of the Swish account phone number + attr_reader :verified_phone_last4 end class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :payment_reference, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # Reference number to locate ACH payments with customer's bank. + attr_reader :payment_reference + # Routing number of the bank account. + attr_reader :routing_number end class Wechat < Stripe::StripeObject; end class WechatPay < Stripe::StripeObject - attr_reader :fingerprint, :transaction_id + # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + attr_reader :fingerprint + # Transaction ID of this particular WeChat Pay transaction. + attr_reader :transaction_id end class Zip < Stripe::StripeObject; end - attr_reader :ach_credit_transfer, :ach_debit, :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_credit_transfer, :sepa_debit, :shopeepay, :sofort, :stripe_account, :swish, :twint, :type, :us_bank_account, :wechat, :wechat_pay, :zip + # Attribute for field ach_credit_transfer + attr_reader :ach_credit_transfer + # Attribute for field ach_debit + attr_reader :ach_debit + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mb_way + attr_reader :mb_way + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_credit_transfer + attr_reader :sepa_credit_transfer + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field stripe_account + attr_reader :stripe_account + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + # An additional hash is included on `payment_method_details` with a name matching this value. + # It contains information specific to the payment method. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat + attr_reader :wechat + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. attr_reader :session end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + attr_reader :amount + # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. + attr_reader :destination end # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount + # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). attr_reader :amount_captured + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). attr_reader :amount_refunded + # ID of the Connect application that created the charge. attr_reader :application + # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. attr_reader :application_fee + # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. attr_reader :application_fee_amount + # Authorization code on the charge. attr_reader :authorization_code + # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). attr_reader :balance_transaction + # Attribute for field billing_details attr_reader :billing_details + # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. attr_reader :calculated_statement_descriptor + # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. attr_reader :captured + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # ID of the customer this charge is for if one exists. attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Whether the charge has been disputed. attr_reader :disputed + # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. attr_reader :failure_balance_transaction + # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). attr_reader :failure_code + # Message to user further explaining reason for charge failure if available. attr_reader :failure_message + # Information on fraud assessments for the charge. attr_reader :fraud_details + # Unique identifier for the object. attr_reader :id + # ID of the invoice this charge is for if one exists. attr_reader :invoice + # Attribute for field level3 attr_reader :level3 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. attr_reader :on_behalf_of + # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. attr_reader :outcome + # `true` if the charge succeeded, or was successfully authorized for later capture. attr_reader :paid + # ID of the PaymentIntent associated with this charge, if one exists. attr_reader :payment_intent + # ID of the payment method used in this charge. attr_reader :payment_method + # Details about the payment method at the time of the transaction. attr_reader :payment_method_details + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. attr_reader :radar_options + # This is the email address that the receipt for this charge was sent to. attr_reader :receipt_email + # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. attr_reader :receipt_number + # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. attr_reader :receipt_url + # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. attr_reader :refunded + # A list of refunds that have been applied to the charge. attr_reader :refunds + # ID of the review associated with this charge if one exists. attr_reader :review + # Shipping information for the charge. attr_reader :shipping + # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. attr_reader :source + # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. attr_reader :source_transfer + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. attr_reader :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. attr_reader :statement_descriptor_suffix + # The status of the payment is either `succeeded`, `pending`, or `failed`. attr_reader :status + # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). attr_reader :transfer + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. attr_reader :transfer_data + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. attr_reader :transfer_group diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index df33c82b8..e107abb4b 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -28,493 +28,1217 @@ def self.object_name end class AdaptivePricing < Stripe::StripeObject + # Whether Adaptive Pricing is enabled. attr_reader :enabled end class AfterExpiration < Stripe::StripeObject class Recovery < Stripe::StripeObject - attr_reader :allow_promotion_codes, :enabled, :expires_at, :url + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + attr_reader :allow_promotion_codes + # If `true`, a recovery url will be generated to recover this Checkout Session if it + # expires before a transaction is completed. It will be attached to the + # Checkout Session object upon expiration. + attr_reader :enabled + # The timestamp at which the recovery URL will expire. + attr_reader :expires_at + # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session + attr_reader :url end + # When set, configuration used to recover the Checkout Session on expiry. attr_reader :recovery end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability, :status + # Indicates whether automatic tax is enabled for the session + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this session. + attr_reader :status end class CollectedInformation < Stripe::StripeObject class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :business_name, :email, :phone, :shipping_details, :tax_ids + # Customer’s business name for this Checkout Session + attr_reader :business_name + # Customer’s email for this Checkout Session + attr_reader :email + # Customer’s phone number for this Checkout Session + attr_reader :phone + # Shipping information for this Checkout Session. + attr_reader :shipping_details + # Customer’s tax ids for this Checkout Session. + attr_reader :tax_ids end class Consent < Stripe::StripeObject - attr_reader :promotions, :terms_of_service + # If `opt_in`, the customer consents to receiving promotional communications + # from the merchant about this Checkout Session. + attr_reader :promotions + # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + attr_reader :terms_of_service end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. attr_reader :position end - attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service + # If set to `hidden`, it will hide legal text related to the reuse of a payment method. + attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + attr_reader :promotions + # If set to `required`, it requires customers to accept the terms of service before being able to pay. + attr_reader :terms_of_service end class CurrencyConversion < Stripe::StripeObject - attr_reader :amount_subtotal, :amount_total, :fx_rate, :source_currency + # Total of all items in source currency before discounts or taxes are applied. + attr_reader :amount_subtotal + # Total of all items in source currency after discounts and taxes are applied. + attr_reader :amount_total + # Exchange rate used to convert source currency amounts to customer currency amounts + attr_reader :fx_rate + # Creation currency of the CheckoutSession before localization + attr_reader :source_currency end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - attr_reader :label, :value + # The label for the option, displayed to the customer. Up to 100 characters. + attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_reader :value end - attr_reader :default_value, :options, :value + # The value that will pre-fill on the payment page. + attr_reader :default_value + # The options available for the customer to select. Up to 200 options allowed. + attr_reader :options + # The option selected by the customer. This will be the `value` for the option. + attr_reader :value end class Label < Stripe::StripeObject - attr_reader :custom, :type + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_reader :custom + # The type of the label. + attr_reader :type end class Numeric < Stripe::StripeObject - attr_reader :default_value, :maximum_length, :minimum_length, :value + # The value that will pre-fill the field on the payment page. + attr_reader :default_value + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length + # The value entered by the customer, containing only digits. + attr_reader :value end class Text < Stripe::StripeObject - attr_reader :default_value, :maximum_length, :minimum_length, :value + # The value that will pre-fill the field on the payment page. + attr_reader :default_value + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length + # The value entered by the customer. + attr_reader :value end - attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type + # Attribute for field dropdown + attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_reader :key + # Attribute for field label + attr_reader :label + # Attribute for field numeric + attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_reader :optional + # Attribute for field text + attr_reader :text + # The type of the field. + attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end - attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance + # Custom text that should be displayed after the payment confirmation button. + attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_reader :terms_of_service_acceptance end class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :address, :email, :name, :phone, :tax_exempt, :tax_ids + # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + attr_reader :address + # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + attr_reader :email + # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + attr_reader :name + # The customer's phone number after a completed Checkout Session. + attr_reader :phone + # The customer’s tax exempt status after a completed Checkout Session. + attr_reader :tax_exempt + # The customer’s tax IDs after a completed Checkout Session. + attr_reader :tax_ids end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. attr_reader :amount_tax_display end - attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options + # The account tax IDs associated with the invoice. + attr_reader :account_tax_ids + # Custom fields displayed on the invoice. + attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Footer displayed on the invoice. + attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Options for invoice PDF rendering. + attr_reader :rendering_options end - attr_reader :enabled, :invoice_data + # Indicates whether invoice creation is enabled for the Checkout Session. + attr_reader :enabled + # Attribute for field invoice_data + attr_reader :invoice_data end class PaymentMethodConfigurationDetails < Stripe::StripeObject - attr_reader :id, :parent + # ID of the payment method configuration used. + attr_reader :id + # ID of the parent payment method configuration used. + attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. + attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :currency, :mandate_options, :setup_future_usage, :verification_method + # Currency supported by the bank account. Returned when the Session is in `setup` mode. + attr_reader :currency + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class Affirm < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AmazonPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Indicates if installments are enabled attr_reader :enabled end - attr_reader :installments, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_three_d_secure, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji + # Attribute for field installments + attr_reader :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_reader :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + attr_reader :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + attr_reader :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_reader :statement_descriptor_suffix_kanji end class Cashapp < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :requested_address_types, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type, :setup_future_usage + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class KakaoPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Oxxo < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :reference, :setup_future_usage, :subsellers + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred locale of the PayPal checkout page that the customer is redirected to. + attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_reader :start_date end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Pix < Stripe::StripeObject + # The number of seconds after which Pix payment will expire. attr_reader :expires_after_seconds end class RevolutPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Swish < Stripe::StripeObject + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. attr_reader :reference end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. attr_reader :mode end - attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + # Attribute for field filters + attr_reader :filters + # Attribute for field manual_entry + attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url end - attr_reader :financial_connections, :setup_future_usage, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :cashapp, :customer_balance, :eps, :fpx, :giropay, :grabpay, :ideal, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :revolut_pay, :samsung_pay, :sepa_debit, :sofort, :swish, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field ideal + attr_reader :ideal + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field us_bank_account + attr_reader :us_bank_account end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. attr_reader :shipping_details end + # Permissions for updating the Checkout Session. attr_reader :update end class PhoneNumberCollection < Stripe::StripeObject + # Indicates whether phone number collection is enabled for the session attr_reader :enabled end class SavedPaymentMethodOptions < Stripe::StripeObject - attr_reader :allow_redisplay_filters, :payment_method_remove, :payment_method_save + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + attr_reader :allow_redisplay_filters + # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + attr_reader :payment_method_remove + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + attr_reader :payment_method_save end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. attr_reader :allowed_countries end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this order. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class ShippingOption < Stripe::StripeObject - attr_reader :shipping_amount, :shipping_rate + # A non-negative integer in cents representing how much to charge. + attr_reader :shipping_amount + # The shipping rate. + attr_reader :shipping_rate end class TaxIdCollection < Stripe::StripeObject - attr_reader :enabled, :required + # Indicates whether tax ID collection is enabled for the session + attr_reader :enabled + # Indicates whether a tax ID is required on the payment page + attr_reader :required end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). attr_reader :adaptive_pricing + # When set, provides configuration for actions to take if this Checkout Session expires. attr_reader :after_expiration + # Enables user redeemable promotion codes. attr_reader :allow_promotion_codes + # Total of all items before discounts or taxes are applied. attr_reader :amount_subtotal + # Total of all items after discounts and taxes are applied. attr_reader :amount_total + # Attribute for field automatic_tax attr_reader :automatic_tax + # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. attr_reader :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. attr_reader :cancel_url + # A unique string to reference the Checkout Session. This can be a # customer ID, a cart ID, or similar, and can be used to reconcile the # Session with your internal systems. attr_reader :client_reference_id + # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. attr_reader :client_secret + # Information about the customer collected within the Checkout Session. attr_reader :collected_information + # Results of `consent_collection` for this session. attr_reader :consent + # When set, provides configuration for the Checkout Session to gather active consent from customers. attr_reader :consent_collection + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions attr_reader :currency_conversion + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. attr_reader :custom_fields + # Attribute for field custom_text attr_reader :custom_text + # The ID of the customer for this Session. # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout # will create a new customer object based on information provided # during the payment flow unless an existing customer was provided when # the Session was created. attr_reader :customer + # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. attr_reader :customer_creation + # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. attr_reader :customer_details + # If provided, this value will be used when the Customer object is created. # If not provided, customers will be asked to enter their email address. # Use this parameter to prefill customer data if you already have an email # on file. To access information about the customer once the payment flow is # complete, use the `customer` attribute. attr_reader :customer_email + # The timestamp at which the Checkout Session will expire. attr_reader :expires_at + # Unique identifier for the object. attr_reader :id + # ID of the invoice created by the Checkout Session, if it exists. attr_reader :invoice + # Details on the state of invoice creation for the Checkout Session. attr_reader :invoice_creation + # The line items purchased by the customer. attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. attr_reader :locale + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The mode of the Checkout Session. attr_reader :mode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. attr_reader :payment_intent + # The ID of the Payment Link that created this Session. attr_reader :payment_link + # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. attr_reader :payment_method_collection + # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. attr_reader :payment_method_configuration_details + # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. attr_reader :payment_method_options + # A list of the types of payment methods (e.g. card) this Checkout # Session is allowed to accept. attr_reader :payment_method_types + # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. # You can use this value to decide when to fulfill your customer's order. attr_reader :payment_status + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. # # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. attr_reader :permissions + # Attribute for field phone_number_collection attr_reader :phone_number_collection + # The ID of the original expired Checkout Session that triggered the recovery flow. attr_reader :recovered_from + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. attr_reader :redirect_on_completion + # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. attr_reader :return_url + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. attr_reader :saved_payment_method_options + # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. attr_reader :setup_intent + # When set, provides configuration for Checkout to collect a shipping address from a customer. attr_reader :shipping_address_collection + # The details of the customer cost of shipping, including the customer chosen ShippingRate. attr_reader :shipping_cost + # Shipping information for this Checkout Session. attr_reader :shipping_details + # The shipping rate options applied to this Session. attr_reader :shipping_options + # The status of the Checkout Session, one of `open`, `complete`, or `expired`. attr_reader :status + # Describes the type of transaction being performed by Checkout in order to customize # relevant text on the page, such as the submit button. `submit_type` can only be # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. attr_reader :submit_type + # The ID of the subscription for Checkout Sessions in `subscription` mode. attr_reader :subscription + # The URL the customer will be directed to after the payment or # subscription creation is successful. attr_reader :success_url + # Attribute for field tax_id_collection attr_reader :tax_id_collection + # Tax and discount details for the computed total amount. attr_reader :total_details + # The UI mode of the Session. Defaults to `hosted`. attr_reader :ui_mode + # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` # This value is only present when the session is active. attr_reader :url diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb index 3962cba81..2c9666363 100644 --- a/lib/stripe/resources/climate/order.rb +++ b/lib/stripe/resources/climate/order.rb @@ -16,57 +16,97 @@ def self.object_name end class Beneficiary < Stripe::StripeObject + # Publicly displayable name for the end beneficiary of carbon removal. attr_reader :public_name end class DeliveryDetail < Stripe::StripeObject class Location < Stripe::StripeObject - attr_reader :city, :country, :latitude, :longitude, :region + # The city where the supplier is located. + attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. + attr_reader :country + # The geographic latitude where the supplier is located. + attr_reader :latitude + # The geographic longitude where the supplier is located. + attr_reader :longitude + # The state/county/province/region where the supplier is located. + attr_reader :region end - attr_reader :delivered_at, :location, :metric_tons, :registry_url, :supplier + # Time at which the delivery occurred. Measured in seconds since the Unix epoch. + attr_reader :delivered_at + # Specific location of this delivery. + attr_reader :location + # Quantity of carbon removal supplied by this delivery. + attr_reader :metric_tons + # Once retired, a URL to the registry entry for the tons from this delivery. + attr_reader :registry_url + # A supplier of carbon removal. + attr_reader :supplier end # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. attr_reader :amount_fees + # Total amount of the carbon removal in the currency's smallest unit. attr_reader :amount_subtotal + # Total amount of the order including fees in the currency's smallest unit. attr_reader :amount_total + # Attribute for field beneficiary attr_reader :beneficiary + # Time at which the order was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at + # Reason for the cancellation of this order. attr_reader :cancellation_reason + # For delivered orders, a URL to a delivery certificate for the order. attr_reader :certificate + # Time at which the order was confirmed. Measured in seconds since the Unix epoch. attr_reader :confirmed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. attr_reader :currency + # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. attr_reader :delayed_at + # Time at which the order was delivered. Measured in seconds since the Unix epoch. attr_reader :delivered_at + # Details about the delivery of carbon removal for this order. attr_reader :delivery_details + # The year this order is expected to be delivered. attr_reader :expected_delivery_year + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Quantity of carbon removal that is included in this order. attr_reader :metric_tons + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Unique ID for the Climate `Product` this order is purchasing. attr_reader :product + # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. attr_reader :product_substituted_at + # The current status of this order. attr_reader :status diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb index e47af3f01..645a93f28 100644 --- a/lib/stripe/resources/climate/product.rb +++ b/lib/stripe/resources/climate/product.rb @@ -14,26 +14,39 @@ def self.object_name end class CurrentPricesPerMetricTon < Stripe::StripeObject - attr_reader :amount_fees, :amount_subtotal, :amount_total + # Fees for one metric ton of carbon removal in the currency's smallest unit. + attr_reader :amount_fees + # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. + attr_reader :amount_subtotal + # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. + attr_reader :amount_total end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Current prices for a metric ton of carbon removal in a currency's smallest unit. attr_reader :current_prices_per_metric_ton + # The year in which the carbon removal is expected to be delivered. attr_reader :delivery_year + # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) # for a list of available carbon removal products. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The quantity of metric tons available for reservation. attr_reader :metric_tons_available + # The Climate product's name. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The carbon removal suppliers that fulfill orders for this Climate product. attr_reader :suppliers diff --git a/lib/stripe/resources/climate/supplier.rb b/lib/stripe/resources/climate/supplier.rb index f48fdb10b..5a31d18d4 100644 --- a/lib/stripe/resources/climate/supplier.rb +++ b/lib/stripe/resources/climate/supplier.rb @@ -13,20 +13,35 @@ def self.object_name end class Location < Stripe::StripeObject - attr_reader :city, :country, :latitude, :longitude, :region + # The city where the supplier is located. + attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. + attr_reader :country + # The geographic latitude where the supplier is located. + attr_reader :latitude + # The geographic longitude where the supplier is located. + attr_reader :longitude + # The state/county/province/region where the supplier is located. + attr_reader :region end # Unique identifier for the object. attr_reader :id + # Link to a webpage to learn more about the supplier. attr_reader :info_url + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The locations in which this supplier operates. attr_reader :locations + # Name of this carbon removal supplier. attr_reader :name + # String representing the object’s type. Objects of the same type share the same value. attr_reader :object + # The scientific pathway used for carbon removal. attr_reader :removal_pathway diff --git a/lib/stripe/resources/confirmation_token.rb b/lib/stripe/resources/confirmation_token.rb index 6166c21e1..d5ff6896a 100644 --- a/lib/stripe/resources/confirmation_token.rb +++ b/lib/stripe/resources/confirmation_token.rb @@ -18,23 +18,41 @@ def self.object_name class MandateData < Stripe::StripeObject class CustomerAcceptance < Stripe::StripeObject class Online < Stripe::StripeObject - attr_reader :ip_address, :user_agent + # The IP address from which the Mandate was accepted by the customer. + attr_reader :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_reader :user_agent end - attr_reader :online, :type + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_reader :online + # The type of customer acceptance information included with the Mandate. + attr_reader :type end + # This hash contains details about the customer acceptance of the Mandate. attr_reader :customer_acceptance end class PaymentMethodOptions < Stripe::StripeObject class Card < Stripe::StripeObject + # The `cvc_update` Token collected from the Payment Element. attr_reader :cvc_token end + # This hash contains the card payment method options. attr_reader :card end class PaymentMethodPreview < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Institution number of the bank account. + attr_reader :institution_number + # Last four digits of the bank account number. + attr_reader :last4 + # Transit number of the bank account. + attr_reader :transit_number end class Affirm < Stripe::StripeObject; end @@ -44,59 +62,177 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4 + # Six-digit number identifying bank and branch associated with this bank account. + attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 end class BacsDebit < Stripe::StripeObject - attr_reader :fingerprint, :last4, :sort_code + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) + attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address. + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name + # Billing phone number (including extension). + attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class GeneratedFrom < Stripe::StripeObject class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + # The authorized amount + attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Details about payments collected offline. + attr_reader :offline + # Defines whether the authorized amount can be over-captured or not + attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt + # Attribute for field wallet + attr_reader :wallet end - attr_reader :card_present, :type + # Attribute for field card_present + attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + attr_reader :type end - attr_reader :charge, :payment_method_details, :setup_attempt + # The charge that created this object. + attr_reader :charge + # Transaction-specific details of the payment method used in the payment. + attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. attr_reader :supported end @@ -108,59 +244,216 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end - attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + # Attribute for field amex_express_checkout + attr_reader :amex_express_checkout + # Attribute for field apple_pay + attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field link + attr_reader :link + # Attribute for field masterpass + attr_reader :masterpass + # Attribute for field samsung_pay + attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type + # Attribute for field visa_checkout + attr_reader :visa_checkout end - attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :three_d_secure_usage, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Checks on Card address and CVC if provided. + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + attr_reader :display_brand + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Details of the original PaymentMethod that created this object. + attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Contains details on how this Card may be used for 3D Secure authentication. + attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Details about payment methods collected offline. + attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # Attribute for field wallet + attr_reader :wallet end class Cashapp < Stripe::StripeObject - attr_reader :buyer_id, :cashtag + # A unique and immutable identifier assigned by Cash App to every buyer. + attr_reader :buyer_id + # A public identifier for buyers using Cash App. + attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. attr_reader :bank end class Fpx < Stripe::StripeObject - attr_reader :account_holder_type, :bank + # Account holder type, if provided. Can be one of `individual` or `company`. + attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + attr_reader :bank end class Giropay < Stripe::StripeObject; end @@ -168,37 +461,91 @@ class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :bank, :bank_code, :bank_name, :display_name + # Attribute for field bank + attr_reader :bank + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field display_name + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. + attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end - attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method + # Card brand. Can be `interac`, `mastercard` or `visa`. + attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # The customer's date of birth, if provided. attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - attr_reader :brand, :last4 + # The local credit or debit card brand. + attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. + attr_reader :last4 end class Link < Stripe::StripeObject - attr_reader :email, :persistent_token + # Account owner's email address. + attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token end class MbWay < Stripe::StripeObject; end @@ -206,12 +553,14 @@ class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. attr_reader :bank end @@ -219,11 +568,25 @@ class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - attr_reader :fingerprint, :payer_email, :payer_id, :verified_email + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email end class Payto < Stripe::StripeObject - attr_reader :bsb_number, :last4, :pay_id + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Last four digits of the bank account number. + attr_reader :last4 + # The PayID alias for the bank account. + attr_reader :pay_id end class Pix < Stripe::StripeObject; end @@ -232,8 +595,14 @@ class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # Attribute for field dob attr_reader :dob end @@ -242,14 +611,29 @@ class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - attr_reader :charge, :setup_attempt + # The ID of the Charge that generated this PaymentMethod, if any. + attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end - attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Branch code of bank associated with the bank account. + attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. + attr_reader :generated_from + # Last four characters of the IBAN. + attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. attr_reader :country end @@ -258,57 +642,223 @@ class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :preferred, :supported + # The preferred network. + attr_reader :preferred + # All supported networks. + attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - attr_reader :network_code, :reason + # The ACH network code that resulted in this block. + attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked + attr_reader :reason end + # Attribute for field blocked attr_reader :blocked end - attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account number of the bank account. + attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # The name of the bank. + attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. + attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Contains information about US bank account networks that can be used. + attr_reader :networks + # Routing number of the bank account. + attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. + attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :allow_redisplay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :billing_details, :blik, :boleto, :card, :card_present, :cashapp, :customer, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :type, :us_bank_account, :wechat_pay, :zip + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + attr_reader :allow_redisplay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + attr_reader :customer + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mb_way + attr_reader :mb_way + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :name, :phone + # Attribute for field address + attr_reader :address + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. attr_reader :expires_at + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Data used for generating a Mandate. attr_reader :mandate_data + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. attr_reader :payment_intent + # Payment-method-specific configuration for this ConfirmationToken. attr_reader :payment_method_options + # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. attr_reader :payment_method_preview + # Return URL used to confirm the Intent. attr_reader :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. # # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. attr_reader :setup_future_usage + # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. attr_reader :setup_intent + # Shipping information collected on this ConfirmationToken. attr_reader :shipping + # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. attr_reader :use_stripe_sdk diff --git a/lib/stripe/resources/connect_collection_transfer.rb b/lib/stripe/resources/connect_collection_transfer.rb index 3e0d4fc7a..9d7758899 100644 --- a/lib/stripe/resources/connect_collection_transfer.rb +++ b/lib/stripe/resources/connect_collection_transfer.rb @@ -10,14 +10,19 @@ def self.object_name # Amount transferred, in cents (or local equivalent). attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # ID of the account that funds are being collected for. attr_reader :destination + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/country_spec.rb b/lib/stripe/resources/country_spec.rb index 9b4aebadd..9ad1cde9e 100644 --- a/lib/stripe/resources/country_spec.rb +++ b/lib/stripe/resources/country_spec.rb @@ -18,28 +18,44 @@ def self.object_name class VerificationFields < Stripe::StripeObject class Company < Stripe::StripeObject - attr_reader :additional, :minimum + # Additional fields which are only required for some users. + attr_reader :additional + # Fields which every account must eventually provide. + attr_reader :minimum end class Individual < Stripe::StripeObject - attr_reader :additional, :minimum + # Additional fields which are only required for some users. + attr_reader :additional + # Fields which every account must eventually provide. + attr_reader :minimum end - attr_reader :company, :individual + # Attribute for field company + attr_reader :company + # Attribute for field individual + attr_reader :individual end # The default currency for this country. This applies to both payment methods and bank accounts. attr_reader :default_currency + # Unique identifier for the object. Represented as the ISO country code for this country. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Currencies that can be accepted in the specific country (for transfers). attr_reader :supported_bank_account_currencies + # Currencies that can be accepted in the specified country (for payments). attr_reader :supported_payment_currencies + # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). attr_reader :supported_payment_methods + # Countries that can accept transfers from the specified country. attr_reader :supported_transfer_countries + # Attribute for field verification_fields attr_reader :verification_fields diff --git a/lib/stripe/resources/coupon.rb b/lib/stripe/resources/coupon.rb index bef8d6eda..b58644a72 100644 --- a/lib/stripe/resources/coupon.rb +++ b/lib/stripe/resources/coupon.rb @@ -17,46 +17,65 @@ def self.object_name end class AppliesTo < Stripe::StripeObject + # A list of product IDs this coupon applies to attr_reader :products end class CurrencyOptions < Stripe::StripeObject + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off end # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off + # Attribute for field applies_to attr_reader :applies_to + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. attr_reader :currency + # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency_options + # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. attr_reader :duration + # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. attr_reader :duration_in_months + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. attr_reader :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Name of the coupon displayed to customers on for instance invoices or receipts. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. attr_reader :percent_off + # Date after which the coupon can no longer be redeemed. attr_reader :redeem_by + # Number of times this coupon has been applied to a customer. attr_reader :times_redeemed + # Taking account of the above properties, whether this coupon can still be applied to a customer. attr_reader :valid + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index b2d1067b0..fe02be889 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -16,93 +16,166 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # Type of the pretax credit amount referenced. + attr_reader :type end class Refund < Stripe::StripeObject - attr_reader :amount_refunded, :refund + # Amount of the refund that applies to this credit note, in cents (or local equivalent). + attr_reader :amount_refunded + # ID of the refund. + attr_reader :refund end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this invoice. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class TaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. attr_reader :amount + # This is the sum of all the shipping amounts. attr_reader :amount_shipping + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # ID of the customer. attr_reader :customer + # Customer balance transaction related to this credit note. attr_reader :customer_balance_transaction + # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. attr_reader :discount_amount + # The aggregate amounts calculated per discount for all line items. attr_reader :discount_amounts + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. attr_reader :effective_at + # Unique identifier for the object. attr_reader :id + # ID of the invoice. attr_reader :invoice + # Line items that make up the credit note attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Customer-facing text that appears on the credit note PDF. attr_reader :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. attr_reader :number + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Amount that was credited outside of Stripe. attr_reader :out_of_band_amount + # The link to download the PDF of the credit note. attr_reader :pdf + # Attribute for field post_payment_amount attr_reader :post_payment_amount + # Attribute for field pre_payment_amount attr_reader :pre_payment_amount + # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. attr_reader :pretax_credit_amounts + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` attr_reader :reason + # Refund related to this credit note. attr_reader :refund + # Refunds related to this credit note. attr_reader :refunds + # The details of the cost of shipping, including the ShippingRate applied to the invoice. attr_reader :shipping_cost + # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). attr_reader :status + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. attr_reader :subtotal + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. attr_reader :subtotal_excluding_tax + # The aggregate amounts calculated per tax rate for all line items. attr_reader :tax_amounts + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. attr_reader :total + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. attr_reader :total_excluding_tax + # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. attr_reader :type + # The time that the credit note was voided. attr_reader :voided_at diff --git a/lib/stripe/resources/credit_note_line_item.rb b/lib/stripe/resources/credit_note_line_item.rb index 072909b44..07110e212 100644 --- a/lib/stripe/resources/credit_note_line_item.rb +++ b/lib/stripe/resources/credit_note_line_item.rb @@ -10,48 +10,83 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # Type of the pretax credit amount referenced. + attr_reader :type end class TaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. attr_reader :amount + # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. attr_reader :amount_excluding_tax + # Description of the item being credited. attr_reader :description + # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. attr_reader :discount_amount + # The amount of discount calculated per discount for this line item attr_reader :discount_amounts + # Unique identifier for the object. attr_reader :id + # ID of the invoice line item being credited attr_reader :invoice_line_item + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. attr_reader :pretax_credit_amounts + # The number of units of product being credited. attr_reader :quantity + # The amount of tax calculated per tax rate for this line item attr_reader :tax_amounts + # The tax rates which apply to the line item. attr_reader :tax_rates + # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. attr_reader :type + # The cost of each unit of product being credited. attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. attr_reader :unit_amount_decimal + # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. attr_reader :unit_amount_excluding_tax end diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb index 5cb98dde4..f24a9e361 100644 --- a/lib/stripe/resources/customer.rb +++ b/lib/stripe/resources/customer.rb @@ -23,95 +23,177 @@ def self.object_name nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list] class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class InvoiceSettings < Stripe::StripeObject class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class RenderingOptions < Stripe::StripeObject - attr_reader :amount_tax_display, :template + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + attr_reader :amount_tax_display + # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. + attr_reader :template end - attr_reader :custom_fields, :default_payment_method, :footer, :rendering_options + # Default custom fields to be displayed on invoices for this customer. + attr_reader :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + attr_reader :default_payment_method + # Default footer to be displayed on invoices for this customer. + attr_reader :footer + # Default options for invoice PDF rendering for this customer. + attr_reader :rendering_options end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class Tax < Stripe::StripeObject class Location < Stripe::StripeObject - attr_reader :country, :source, :state + # The customer's country as identified by Stripe Tax. + attr_reader :country + # The data source used to infer the customer's location. + attr_reader :source + # The customer's state, county, province, or region as identified by Stripe Tax. + attr_reader :state end - attr_reader :automatic_tax, :ip_address, :location + # Surfaces if automatic tax computation is possible given the current customer location information. + attr_reader :automatic_tax + # A recent IP address of the customer used for tax reporting and tax location inference. + attr_reader :ip_address + # The customer's location as identified by Stripe Tax. + attr_reader :location end # The customer's address. attr_reader :address + # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. attr_reader :balance + # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. attr_reader :cash_balance + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. attr_reader :currency + # ID of the default payment source for the customer. # # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. attr_reader :default_source + # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. # # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. # # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. attr_reader :delinquent + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Describes the current discount active on the customer, if there is one. attr_reader :discount + # The customer's email address. attr_reader :email + # Unique identifier for the object. attr_reader :id + # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. attr_reader :invoice_credit_balance + # The prefix for the customer used to generate unique invoice numbers. attr_reader :invoice_prefix + # Attribute for field invoice_settings attr_reader :invoice_settings + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The customer's full name or business name. attr_reader :name + # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. attr_reader :next_invoice_sequence + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The customer's phone number. attr_reader :phone + # The customer's preferred locales (languages), ordered by preference. attr_reader :preferred_locales + # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. attr_reader :shipping + # The customer's payment sources, if any. attr_reader :sources + # The customer's current subscriptions, if any. attr_reader :subscriptions + # Attribute for field tax attr_reader :tax + # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. attr_reader :tax_exempt + # The customer's tax IDs. attr_reader :tax_ids + # ID of the test clock that this customer belongs to. attr_reader :test_clock + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/customer_balance_transaction.rb b/lib/stripe/resources/customer_balance_transaction.rb index 9ad1d4b98..bb812dd43 100644 --- a/lib/stripe/resources/customer_balance_transaction.rb +++ b/lib/stripe/resources/customer_balance_transaction.rb @@ -18,28 +18,40 @@ def self.object_name # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The ID of the credit note (if any) related to the transaction. attr_reader :credit_note + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The ID of the customer the transaction belongs to. attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. attr_reader :ending_balance + # Unique identifier for the object. attr_reader :id + # The ID of the invoice (if any) related to the transaction. attr_reader :invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. attr_reader :type diff --git a/lib/stripe/resources/customer_cash_balance_transaction.rb b/lib/stripe/resources/customer_cash_balance_transaction.rb index 8413107e0..94c991734 100644 --- a/lib/stripe/resources/customer_cash_balance_transaction.rb +++ b/lib/stripe/resources/customer_cash_balance_transaction.rb @@ -13,74 +13,125 @@ def self.object_name end class AdjustedForOverdraft < Stripe::StripeObject - attr_reader :balance_transaction, :linked_transaction + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + attr_reader :balance_transaction + # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + attr_reader :linked_transaction end class AppliedToPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. attr_reader :payment_intent end class Funded < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - attr_reader :bic, :iban_last4, :sender_name + # The BIC of the bank of the sender of the funding. + attr_reader :bic + # The last 4 digits of the IBAN of the sender of the funding. + attr_reader :iban_last4 + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name end class GbBankTransfer < Stripe::StripeObject - attr_reader :account_number_last4, :sender_name, :sort_code + # The last 4 digits of the account number of the sender of the funding. + attr_reader :account_number_last4 + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name + # The sort code of the bank of the sender of the funding + attr_reader :sort_code end class JpBankTransfer < Stripe::StripeObject - attr_reader :sender_bank, :sender_branch, :sender_name + # The name of the bank of the sender of the funding. + attr_reader :sender_bank + # The name of the bank branch of the sender of the funding. + attr_reader :sender_branch + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name end class UsBankTransfer < Stripe::StripeObject - attr_reader :network, :sender_name + # The banking network used for this funding. + attr_reader :network + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name end - attr_reader :eu_bank_transfer, :gb_bank_transfer, :jp_bank_transfer, :reference, :type, :us_bank_transfer + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer + attr_reader :gb_bank_transfer + # Attribute for field jp_bank_transfer + attr_reader :jp_bank_transfer + # The user-supplied reference field on the bank transfer. + attr_reader :reference + # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type + # Attribute for field us_bank_transfer + attr_reader :us_bank_transfer end + # Attribute for field bank_transfer attr_reader :bank_transfer end class RefundedFromPayment < Stripe::StripeObject + # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. attr_reader :refund end class TransferredToBalance < Stripe::StripeObject + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. attr_reader :balance_transaction end class UnappliedFromPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. attr_reader :payment_intent end # Attribute for field adjusted_for_overdraft attr_reader :adjusted_for_overdraft + # Attribute for field applied_to_payment attr_reader :applied_to_payment + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The customer whose available cash balance changed as a result of this transaction. attr_reader :customer + # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :ending_balance + # Attribute for field funded attr_reader :funded + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. attr_reader :net_amount + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field refunded_from_payment attr_reader :refunded_from_payment + # Attribute for field transferred_to_balance attr_reader :transferred_to_balance + # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. attr_reader :type + # Attribute for field unapplied_from_payment attr_reader :unapplied_from_payment end diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb index 0d5ba8954..513bd9ace 100644 --- a/lib/stripe/resources/customer_session.rb +++ b/lib/stripe/resources/customer_session.rb @@ -18,35 +18,70 @@ def self.object_name class Components < Stripe::StripeObject class BuyButton < Stripe::StripeObject + # Whether the buy button is enabled. attr_reader :enabled end class PaymentElement < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :payment_method_allow_redisplay_filters, :payment_method_redisplay, :payment_method_redisplay_limit, :payment_method_remove, :payment_method_save, :payment_method_save_usage + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + attr_reader :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + attr_reader :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + attr_reader :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + attr_reader :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + attr_reader :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + attr_reader :payment_method_save_usage end - attr_reader :enabled, :features + # Whether the Payment Element is enabled. + attr_reader :enabled + # This hash defines whether the Payment Element supports certain features. + attr_reader :features end class PricingTable < Stripe::StripeObject + # Whether the pricing table is enabled. attr_reader :enabled end - attr_reader :buy_button, :payment_element, :pricing_table + # This hash contains whether the buy button is enabled. + attr_reader :buy_button + # This hash contains whether the Payment Element is enabled and the features it supports. + attr_reader :payment_element + # This hash contains whether the pricing table is enabled. + attr_reader :pricing_table end # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. # # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. attr_reader :client_secret + # Configuration for the components supported by this Customer Session. attr_reader :components + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The Customer the Customer Session was created for. attr_reader :customer + # The timestamp at which this Customer Session will expire. attr_reader :expires_at + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/discount.rb b/lib/stripe/resources/discount.rb index 4be0398a3..ed9af3c6e 100644 --- a/lib/stripe/resources/discount.rb +++ b/lib/stripe/resources/discount.rb @@ -14,30 +14,42 @@ def self.object_name # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. attr_reader :checkout_session + # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). attr_reader :coupon + # The ID of the customer associated with this discount. attr_reader :customer + # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. attr_reader :end + # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. attr_reader :id + # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. attr_reader :invoice + # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. attr_reader :invoice_item + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The promotion code applied to create this discount. attr_reader :promotion_code + # Date that the coupon was applied. attr_reader :start + # The subscription that this coupon is applied to, if it is applied to a particular subscription. attr_reader :subscription + # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. attr_reader :subscription_item + # Always true for a deleted object attr_reader :deleted end diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb index ad46a11ba..07de5aeb1 100644 --- a/lib/stripe/resources/dispute.rb +++ b/lib/stripe/resources/dispute.rb @@ -21,86 +21,246 @@ class EnhancedEvidence < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject class DisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :merchandise_or_services, :product_description, :shipping_address + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_reader :customer_device_id + # The email address of the customer. + attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. + attr_reader :customer_purchase_ip + # Categorization of disputed payment. + attr_reader :merchandise_or_services + # A description of the product or service that was sold. + attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :shipping_address end class PriorUndisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :charge, :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :product_description, :shipping_address + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + attr_reader :charge + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_reader :customer_device_id + # The email address of the customer. + attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. + attr_reader :customer_purchase_ip + # A description of the product or service that was sold. + attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :shipping_address end - attr_reader :disputed_transaction, :prior_undisputed_transactions + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :prior_undisputed_transactions end + # Attribute for field visa_compelling_evidence_3 attr_reader :visa_compelling_evidence_3 end - attr_reader :access_activity_log, :billing_address, :cancellation_policy, :cancellation_policy_disclosure, :cancellation_rebuttal, :customer_communication, :customer_email_address, :customer_name, :customer_purchase_ip, :customer_signature, :duplicate_charge_documentation, :duplicate_charge_explanation, :duplicate_charge_id, :enhanced_evidence, :product_description, :receipt, :refund_policy, :refund_policy_disclosure, :refund_refusal_explanation, :service_date, :service_documentation, :shipping_address, :shipping_carrier, :shipping_date, :shipping_documentation, :shipping_tracking_number, :uncategorized_file, :uncategorized_text + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. + attr_reader :access_activity_log + # The billing address provided by the customer. + attr_reader :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + attr_reader :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. + attr_reader :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. + attr_reader :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + attr_reader :customer_communication + # The email address of the customer. + attr_reader :customer_email_address + # The name of the customer. + attr_reader :customer_name + # The IP address that the customer used when making the purchase. + attr_reader :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + attr_reader :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + attr_reader :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. + attr_reader :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + attr_reader :duplicate_charge_id + # Attribute for field enhanced_evidence + attr_reader :enhanced_evidence + # A description of the product or service that was sold. + attr_reader :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + attr_reader :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + attr_reader :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. + attr_reader :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. + attr_reader :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + attr_reader :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + attr_reader :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. + attr_reader :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + attr_reader :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. + attr_reader :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + attr_reader :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + attr_reader :uncategorized_file + # Any additional evidence or statements. + attr_reader :uncategorized_text end class EvidenceDetails < Stripe::StripeObject class EnhancedEligibility < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject - attr_reader :required_actions, :status + # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :required_actions + # Visa Compelling Evidence 3.0 eligibility status. + attr_reader :status end + # Attribute for field visa_compelling_evidence_3 attr_reader :visa_compelling_evidence_3 end - attr_reader :due_by, :enhanced_eligibility, :has_evidence, :past_due, :submission_count + # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. + attr_reader :due_by + # Attribute for field enhanced_eligibility + attr_reader :enhanced_eligibility + # Whether evidence has been staged for this dispute. + attr_reader :has_evidence + # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. + attr_reader :past_due + # The number of times evidence has been submitted. Typically, you may only submit evidence once. + attr_reader :submission_count end class PaymentMethodDetails < Stripe::StripeObject class AmazonPay < Stripe::StripeObject + # The AmazonPay dispute type, chargeback or claim attr_reader :dispute_type end class Card < Stripe::StripeObject - attr_reader :brand, :case_type, :network_reason_code + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The type of dispute opened. Different case types may have varying fees and financial impact. + attr_reader :case_type + # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + attr_reader :network_reason_code end class Klarna < Stripe::StripeObject + # The reason for the dispute as defined by Klarna attr_reader :reason_code end class Paypal < Stripe::StripeObject - attr_reader :case_id, :reason_code + # The ID of the dispute in PayPal. + attr_reader :case_id + # The reason for the dispute as defined by PayPal + attr_reader :reason_code end - attr_reader :amazon_pay, :card, :klarna, :paypal, :type + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field card + attr_reader :card + # Attribute for field klarna + attr_reader :klarna + # Attribute for field paypal + attr_reader :paypal + # Payment method type. + attr_reader :type end # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). attr_reader :amount + # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. attr_reader :balance_transactions + # ID of the charge that's disputed. attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # List of eligibility types that are included in `enhanced_evidence`. attr_reader :enhanced_eligibility_types + # Attribute for field evidence attr_reader :evidence + # Attribute for field evidence_details attr_reader :evidence_details + # Unique identifier for the object. attr_reader :id + # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. attr_reader :is_charge_refundable + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Network-dependent reason code for the dispute. attr_reader :network_reason_code + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the PaymentIntent that's disputed. attr_reader :payment_intent + # Attribute for field payment_method_details attr_reader :payment_method_details + # Reason given by cardholder for 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`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). attr_reader :reason + # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. attr_reader :status diff --git a/lib/stripe/resources/entitlements/active_entitlement.rb b/lib/stripe/resources/entitlements/active_entitlement.rb index 76dd2e814..abb05c3b8 100644 --- a/lib/stripe/resources/entitlements/active_entitlement.rb +++ b/lib/stripe/resources/entitlements/active_entitlement.rb @@ -14,12 +14,16 @@ def self.object_name # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. attr_reader :feature + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # A unique key you provide as your own system identifier. This may be up to 80 characters. attr_reader :lookup_key + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/entitlements/active_entitlement_summary.rb b/lib/stripe/resources/entitlements/active_entitlement_summary.rb index 7fd0fa7fc..2680c7c3f 100644 --- a/lib/stripe/resources/entitlements/active_entitlement_summary.rb +++ b/lib/stripe/resources/entitlements/active_entitlement_summary.rb @@ -12,10 +12,13 @@ def self.object_name # The customer that is entitled to this feature. attr_reader :customer + # The list of entitlements this customer has. attr_reader :entitlements + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/entitlements/feature.rb b/lib/stripe/resources/entitlements/feature.rb index 818f93eda..023acb2a9 100644 --- a/lib/stripe/resources/entitlements/feature.rb +++ b/lib/stripe/resources/entitlements/feature.rb @@ -17,16 +17,22 @@ def self.object_name # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. attr_reader :active + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # A unique key you provide as your own system identifier. This may be up to 80 characters. attr_reader :lookup_key + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/ephemeral_key.rb b/lib/stripe/resources/ephemeral_key.rb index 55ace3a75..baff0304d 100644 --- a/lib/stripe/resources/ephemeral_key.rb +++ b/lib/stripe/resources/ephemeral_key.rb @@ -13,14 +13,19 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Time at which the key will expire. Measured in seconds since the Unix epoch. attr_reader :expires + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The key's secret. You can use this value to make authorized requests to the Stripe API. attr_reader :secret diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index 881dd9a7e..b96f88161 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -41,46 +41,77 @@ def self.object_name end class Data < Stripe::StripeObject - attr_reader :object, :previous_attributes + # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. + attr_reader :object + # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. + attr_reader :previous_attributes end class Reason < Stripe::StripeObject class AutomationAction < Stripe::StripeObject class StripeSendWebhookCustomEvent < Stripe::StripeObject + # Set of key-value pairs attached to the action when creating an Automation. attr_reader :custom_data end - attr_reader :stripe_send_webhook_custom_event, :trigger, :type + # Attribute for field stripe_send_webhook_custom_event + attr_reader :stripe_send_webhook_custom_event + # The trigger name of the automation that triggered this action. + # Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. + attr_reader :trigger + # The type of the `automation_action`. + attr_reader :type end class Request < Stripe::StripeObject - attr_reader :id, :idempotency_key + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + attr_reader :idempotency_key end - attr_reader :automation_action, :request, :type + # Attribute for field automation_action + attr_reader :automation_action + # Attribute for field request + attr_reader :request + # The type of the reason for the event. + attr_reader :type end class Request < Stripe::StripeObject - attr_reader :id, :idempotency_key + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + attr_reader :idempotency_key end # The connected account that originates the event. attr_reader :account + # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. attr_reader :api_version + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Attribute for field data attr_reader :data + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. attr_reader :pending_webhooks + # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. attr_reader :reason + # Information on the API request that triggers the event. attr_reader :request + # Description of the event (for example, `invoice.created` or `charge.refunded`). attr_reader :type diff --git a/lib/stripe/resources/exchange_rate.rb b/lib/stripe/resources/exchange_rate.rb index cf00aa263..89875999e 100644 --- a/lib/stripe/resources/exchange_rate.rb +++ b/lib/stripe/resources/exchange_rate.rb @@ -38,8 +38,10 @@ def self.object_name # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. attr_reader :rates diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index 0f490f61a..a713d0d58 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -20,24 +20,34 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The file expires and isn't available at this time in epoch seconds. attr_reader :expires_at + # The suitable name for saving the file to a filesystem. attr_reader :filename + # Unique identifier for the object. attr_reader :id + # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. attr_reader :links + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. attr_reader :purpose + # The size of the file object in bytes. attr_reader :size + # A suitable title for the document. attr_reader :title + # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). attr_reader :type + # Use your live secret API key to download the file from this URL. attr_reader :url diff --git a/lib/stripe/resources/file_link.rb b/lib/stripe/resources/file_link.rb index 52b89a9c1..eb187b8c1 100644 --- a/lib/stripe/resources/file_link.rb +++ b/lib/stripe/resources/file_link.rb @@ -17,20 +17,28 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Returns if the link is already expired. attr_reader :expired + # Time that the link expires. attr_reader :expires_at + # The file object this link points to. attr_reader :file + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The publicly accessible URL to download the file. attr_reader :url diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index ecd842c08..e54110cae 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -16,67 +16,133 @@ def self.object_name nested_resource_class_methods :inferred_balance, operations: %i[list] class AccountHolder < Stripe::StripeObject - attr_reader :account, :customer, :type + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + attr_reader :customer + # Type of account holder that this account belongs to. + attr_reader :type end class Balance < Stripe::StripeObject class Cash < Stripe::StripeObject + # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :available end class Credit < Stripe::StripeObject + # The credit that has been used by the account holder. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :used end - attr_reader :as_of, :cash, :credit, :current, :type + # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + attr_reader :as_of + # Attribute for field cash + attr_reader :cash + # Attribute for field credit + attr_reader :credit + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + attr_reader :current + # The `type` of the balance. An additional hash is included on the balance with a name matching this value. + attr_reader :type end class BalanceRefresh < Stripe::StripeObject - attr_reader :last_attempted_at, :next_refresh_available_at, :status + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end class InferredBalancesRefresh < Stripe::StripeObject - attr_reader :last_attempted_at, :next_refresh_available_at, :status + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end class OwnershipRefresh < Stripe::StripeObject - attr_reader :last_attempted_at, :next_refresh_available_at, :status + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end class TransactionRefresh < Stripe::StripeObject - attr_reader :id, :last_attempted_at, :next_refresh_available_at, :status + # Unique identifier for the object. + attr_reader :id + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end # The account holder that this account belongs to. attr_reader :account_holder + # The most recent information about the account's balance. attr_reader :balance + # The state of the most recent attempt to refresh the account balance. attr_reader :balance_refresh + # The type of the account. Account category is further divided in `subcategory`. attr_reader :category + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # A human-readable name that has been assigned to this account, either by the account holder or by the institution. attr_reader :display_name + # Unique identifier for the object. attr_reader :id + # The state of the most recent attempt to refresh the account's inferred balance history. attr_reader :inferred_balances_refresh + # The name of the institution that holds this account. attr_reader :institution_name + # The last 4 digits of the account number. If present, this will be 4 numeric characters. attr_reader :last4 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The most recent information about the account's owners. attr_reader :ownership + # The state of the most recent attempt to refresh the account owners. attr_reader :ownership_refresh + # The list of permissions granted by this account. attr_reader :permissions + # The status of the link to the account. attr_reader :status + # If `category` is `cash`, one of: # # - `checking` @@ -92,10 +158,13 @@ class TransactionRefresh < Stripe::StripeObject # # If `category` is `investment` or `other`, this will be `other`. attr_reader :subcategory + # The list of data refresh subscriptions requested on this account. attr_reader :subscriptions + # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. attr_reader :supported_payment_method_types + # The state of the most recent attempt to refresh the account transactions. attr_reader :transaction_refresh diff --git a/lib/stripe/resources/financial_connections/account_inferred_balance.rb b/lib/stripe/resources/financial_connections/account_inferred_balance.rb index 25176af79..82b328f23 100644 --- a/lib/stripe/resources/financial_connections/account_inferred_balance.rb +++ b/lib/stripe/resources/financial_connections/account_inferred_balance.rb @@ -12,14 +12,17 @@ def self.object_name # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. attr_reader :as_of + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. # # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. # # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :current + # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/financial_connections/account_owner.rb b/lib/stripe/resources/financial_connections/account_owner.rb index c5ef98197..43d6754a2 100644 --- a/lib/stripe/resources/financial_connections/account_owner.rb +++ b/lib/stripe/resources/financial_connections/account_owner.rb @@ -12,18 +12,25 @@ def self.object_name # The email address of the owner. attr_reader :email + # Unique identifier for the object. attr_reader :id + # The full name of the owner. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ownership object that this owner belongs to. attr_reader :ownership + # The raw phone number of the owner. attr_reader :phone + # The raw physical address of the owner. attr_reader :raw_address + # The timestamp of the refresh that updated this owner. attr_reader :refreshed_at end diff --git a/lib/stripe/resources/financial_connections/account_ownership.rb b/lib/stripe/resources/financial_connections/account_ownership.rb index 439272e0e..a8996967b 100644 --- a/lib/stripe/resources/financial_connections/account_ownership.rb +++ b/lib/stripe/resources/financial_connections/account_ownership.rb @@ -12,10 +12,13 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # A paginated list of owners for this account. attr_reader :owners end diff --git a/lib/stripe/resources/financial_connections/institution.rb b/lib/stripe/resources/financial_connections/institution.rb index 8bf8f0b03..c1567d1f4 100644 --- a/lib/stripe/resources/financial_connections/institution.rb +++ b/lib/stripe/resources/financial_connections/institution.rb @@ -14,36 +14,54 @@ def self.object_name class Features < Stripe::StripeObject class Balances < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end class Ownership < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end class PaymentMethod < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end class Transactions < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end - attr_reader :balances, :ownership, :payment_method, :transactions + # Attribute for field balances + attr_reader :balances + # Attribute for field ownership + attr_reader :ownership + # Attribute for field payment_method + attr_reader :payment_method + # Attribute for field transactions + attr_reader :transactions end # Attribute for field features attr_reader :features + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The name of this institution. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. attr_reader :routing_numbers + # The status of this institution in the Financial Connections authentication flow. attr_reader :status + # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. attr_reader :url diff --git a/lib/stripe/resources/financial_connections/session.rb b/lib/stripe/resources/financial_connections/session.rb index 5ceb2036f..baba362b6 100644 --- a/lib/stripe/resources/financial_connections/session.rb +++ b/lib/stripe/resources/financial_connections/session.rb @@ -13,14 +13,25 @@ def self.object_name end class AccountHolder < Stripe::StripeObject - attr_reader :account, :customer, :type + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + attr_reader :customer + # Type of account holder that this account belongs to. + attr_reader :type end class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :countries, :institution + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + attr_reader :account_subcategories + # List of countries from which to filter accounts. + attr_reader :countries + # Stripe ID of the institution with which the customer should be directed to log in. + attr_reader :institution end class Limits < Stripe::StripeObject + # The number of accounts that can be linked in this Session. attr_reader :accounts end @@ -28,36 +39,51 @@ class ManualEntry < Stripe::StripeObject; end class StatusDetails < Stripe::StripeObject class Cancelled < Stripe::StripeObject + # The reason for the Session being cancelled. attr_reader :reason end + # Attribute for field cancelled attr_reader :cancelled end # The account holder for whom accounts are collected in this session. attr_reader :account_holder + # The accounts that were collected as part of this Session. attr_reader :accounts + # A value that will be passed to the client to launch the authentication flow. attr_reader :client_secret + # Attribute for field filters attr_reader :filters + # Unique identifier for the object. attr_reader :id + # Attribute for field limits attr_reader :limits + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Attribute for field manual_entry attr_reader :manual_entry + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Permissions requested for accounts collected during this session. attr_reader :permissions + # Data features requested to be retrieved upon account creation. attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. attr_reader :return_url + # The current state of the session. attr_reader :status + # Attribute for field status_details attr_reader :status_details diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb index 1bf15f3cb..2f61489fb 100644 --- a/lib/stripe/resources/financial_connections/transaction.rb +++ b/lib/stripe/resources/financial_connections/transaction.rb @@ -13,30 +13,44 @@ def self.object_name end class StatusTransitions < Stripe::StripeObject - attr_reader :posted_at, :void_at + # Time at which this transaction posted. Measured in seconds since the Unix epoch. + attr_reader :posted_at + # Time at which this transaction was voided. Measured in seconds since the Unix epoch. + attr_reader :void_at end # The ID of the Financial Connections Account this transaction belongs to. attr_reader :account + # The amount of this transaction, in cents (or local equivalent). attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The description of this transaction. attr_reader :description + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The status of the transaction. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. attr_reader :transacted_at + # The token of the transaction refresh that last updated or created this transaction. attr_reader :transaction_refresh + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated diff --git a/lib/stripe/resources/forwarding/request.rb b/lib/stripe/resources/forwarding/request.rb index c66e94fdc..14a908ace 100644 --- a/lib/stripe/resources/forwarding/request.rb +++ b/lib/stripe/resources/forwarding/request.rb @@ -29,42 +29,71 @@ def self.object_name end class RequestContext < Stripe::StripeObject - attr_reader :destination_duration, :destination_ip_address + # The time it took in milliseconds for the destination endpoint to respond. + attr_reader :destination_duration + # The IP address of the destination. + attr_reader :destination_ip_address end class RequestDetails < Stripe::StripeObject class Header < Stripe::StripeObject - attr_reader :name, :value + # The header name. + attr_reader :name + # The header value. + attr_reader :value end - attr_reader :body, :headers, :http_method + # The body payload to send to the destination endpoint. + attr_reader :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + attr_reader :headers + # The HTTP method used to call the destination endpoint. + attr_reader :http_method end class ResponseDetails < Stripe::StripeObject class Header < Stripe::StripeObject - attr_reader :name, :value + # The header name. + attr_reader :name + # The header value. + attr_reader :value end - attr_reader :body, :headers, :status + # The response body from the destination endpoint to Stripe. + attr_reader :body + # HTTP headers that the destination endpoint returned. + attr_reader :headers + # The HTTP status code that the destination endpoint returned. + attr_reader :status end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. attr_reader :payment_method + # The field kinds to be replaced in the forwarded request. attr_reader :replacements + # Context about the request from Stripe's servers to the destination endpoint. attr_reader :request_context + # The request that was sent to the destination endpoint. We redact any sensitive fields. attr_reader :request_details + # The response that the destination endpoint returned to us. We redact any sensitive fields. attr_reader :response_details + # The destination URL for the forwarded request. Must be supported by the config. attr_reader :url diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb index 5f4a323bb..8e486c4b8 100644 --- a/lib/stripe/resources/funding_instructions.rb +++ b/lib/stripe/resources/funding_instructions.rb @@ -17,53 +17,177 @@ class BankTransfer < Stripe::StripeObject class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The ABA account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The ABA routing number + attr_reader :routing_number end class Iban < Stripe::StripeObject - attr_reader :account_holder_name, :bic, :country, :iban + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # The BIC/SWIFT code of the account. + attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # The IBAN of the account. + attr_reader :iban end class SortCode < Stripe::StripeObject - attr_reader :account_holder_name, :account_number, :sort_code + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The six-digit sort code + attr_reader :sort_code end class Spei < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :clabe + # The three-digit bank code + attr_reader :bank_code + # The short banking institution name + attr_reader :bank_name + # The CLABE number + attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The SWIFT code + attr_reader :swift_code end class Zengin < Stripe::StripeObject - attr_reader :account_holder_name, :account_number, :account_type, :bank_code, :bank_name, :branch_code, :branch_name + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. + attr_reader :account_type + # The bank code of the account + attr_reader :bank_code + # The bank name of the account + attr_reader :bank_name + # The branch code of the account + attr_reader :branch_code + # The branch name of the account + attr_reader :branch_name end - attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin + # ABA Records contain U.S. bank account details per the ABA format. + attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. + attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. + attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. + attr_reader :spei + # The payment networks supported by this FinancialAddress + attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. + attr_reader :swift + # The type of financial address + attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. + attr_reader :zengin end - attr_reader :country, :financial_addresses, :type + # The country of the bank account to fund + attr_reader :country + # A list of financial addresses that can be used to fund a particular balance + attr_reader :financial_addresses + # The bank_transfer type + attr_reader :type end # Attribute for field bank_transfer attr_reader :bank_transfer + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The `funding_type` of the returned instructions attr_reader :funding_type + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/gift_cards/card.rb b/lib/stripe/resources/gift_cards/card.rb index b8fd8e4cd..cab803961 100644 --- a/lib/stripe/resources/gift_cards/card.rb +++ b/lib/stripe/resources/gift_cards/card.rb @@ -17,38 +17,62 @@ def self.object_name class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - attr_reader :checkout_session, :line_item + # The Stripe CheckoutSession that created this object. + attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. + attr_reader :line_item end class Order < Stripe::StripeObject - attr_reader :line_item, :order + # The Stripe Order LineItem that created this object. + attr_reader :line_item + # The Stripe Order that created this object. + attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. attr_reader :payment_intent end - attr_reader :checkout, :order, :payment, :type + # Attribute for field checkout + attr_reader :checkout + # Attribute for field order + attr_reader :order + # Attribute for field payment + attr_reader :payment + # The type of event that created this object. + attr_reader :type end # Whether this gift card can be used or not. attr_reader :active + # The amount of funds available for new transactions. attr_reader :amount_available + # The amount of funds marked as held. attr_reader :amount_held + # Code used to redeem this gift card. attr_reader :code + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The related Stripe objects that created this gift card. attr_reader :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Unique identifier for the object. attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Transactions on this gift card. attr_reader :transactions diff --git a/lib/stripe/resources/gift_cards/transaction.rb b/lib/stripe/resources/gift_cards/transaction.rb index 88b538ce2..a9420df81 100644 --- a/lib/stripe/resources/gift_cards/transaction.rb +++ b/lib/stripe/resources/gift_cards/transaction.rb @@ -21,40 +21,65 @@ def self.object_name class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - attr_reader :checkout_session, :line_item + # The Stripe CheckoutSession that created this object. + attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. + attr_reader :line_item end class Order < Stripe::StripeObject - attr_reader :line_item, :order + # The Stripe Order LineItem that created this object. + attr_reader :line_item + # The Stripe Order that created this object. + attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. attr_reader :payment_intent end - attr_reader :checkout, :order, :payment, :type + # Attribute for field checkout + attr_reader :checkout + # Attribute for field order + attr_reader :order + # Attribute for field payment + attr_reader :payment + # The type of event that created this object. + attr_reader :type end # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. attr_reader :amount + # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. attr_reader :confirmed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The related Stripe objects that created this gift card transaction. attr_reader :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # The gift card that this transaction occurred on attr_reader :gift_card + # Unique identifier for the object. attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Status of this transaction, one of `held`, `confirmed`, or `canceled`. attr_reader :status + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. attr_reader :transfer_group diff --git a/lib/stripe/resources/identity/verification_report.rb b/lib/stripe/resources/identity/verification_report.rb index 37f4a6a73..725a5e27b 100644 --- a/lib/stripe/resources/identity/verification_report.rb +++ b/lib/stripe/resources/identity/verification_report.rb @@ -24,93 +24,215 @@ def self.object_name class Document < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end class ExpirationDate < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end class IssuedDate < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end - attr_reader :address, :dob, :error, :expiration_date, :files, :first_name, :issued_date, :issuing_country, :last_name, :number, :status, :type + # Address as it appears in the document. + attr_reader :address + # Date of birth as it appears in the document. + attr_reader :dob + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # Expiration date of the document. + attr_reader :expiration_date + # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. + attr_reader :files + # First name as it appears in the document. + attr_reader :first_name + # Issued date of the document. + attr_reader :issued_date + # Issuing country of the document. + attr_reader :issuing_country + # Last name as it appears in the document. + attr_reader :last_name + # Document ID number. + attr_reader :number + # Status of this `document` check. + attr_reader :status + # Type of the document. + attr_reader :type end class Email < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :email, :error, :status + # Email to be verified. + attr_reader :email + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # Status of this `email` check. + attr_reader :status end class IdNumber < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :dob, :error, :first_name, :id_number, :id_number_type, :last_name, :status + # Date of birth. + attr_reader :dob + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # First name. + attr_reader :first_name + # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. + attr_reader :id_number + # Type of ID number. + attr_reader :id_number_type + # Last name. + attr_reader :last_name + # Status of this `id_number` check. + attr_reader :status end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_reader :require_matching_selfie end class IdNumber < Stripe::StripeObject; end - attr_reader :document, :id_number + # Attribute for field document + attr_reader :document + # Attribute for field id_number + attr_reader :id_number end class Phone < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :error, :phone, :status + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # Phone to be verified. + attr_reader :phone + # Status of this `phone` check. + attr_reader :status end class Selfie < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :document, :error, :selfie, :status + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. + attr_reader :document + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. + attr_reader :selfie + # Status of this `selfie` check. + attr_reader :status end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Result from a document check attr_reader :document + # Result from a email check attr_reader :email + # Unique identifier for the object. attr_reader :id + # Result from an id_number check attr_reader :id_number + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field options attr_reader :options + # Result from a phone check attr_reader :phone + # Result from a selfie check attr_reader :selfie + # Type of report. attr_reader :type + # The configuration token of a verification flow from the dashboard. attr_reader :verification_flow + # ID of the VerificationSession that created this report. attr_reader :verification_session diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index dc8ce7ece..6c161cf44 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -25,78 +25,149 @@ def self.object_name end class LastError < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification or user-session failure. + attr_reader :code + # A message that explains the reason for verification or user-session failure. + attr_reader :reason end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_reader :require_matching_selfie end class Email < Stripe::StripeObject + # Request one time password verification of `provided_details.email`. attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end class Phone < Stripe::StripeObject + # Request one time password verification of `provided_details.phone`. attr_reader :require_verification end - attr_reader :document, :email, :id_number, :phone + # Attribute for field document + attr_reader :document + # Attribute for field email + attr_reader :email + # Attribute for field id_number + attr_reader :id_number + # Attribute for field phone + attr_reader :phone end class ProvidedDetails < Stripe::StripeObject - attr_reader :email, :phone + # Email of user being verified + attr_reader :email + # Phone number of user being verified + attr_reader :phone end class Redaction < Stripe::StripeObject + # Indicates whether this object and its related objects have been redacted or not. attr_reader :status end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end - attr_reader :address, :dob, :email, :first_name, :id_number, :id_number_type, :last_name, :phone + # The user's verified address. + attr_reader :address + # The user’s verified date of birth. + attr_reader :dob + # The user's verified email address + attr_reader :email + # The user's verified first name. + attr_reader :first_name + # The user's verified id number. + attr_reader :id_number + # The user's verified id number type. + attr_reader :id_number_type + # The user's verified last name. + attr_reader :last_name + # The user's verified phone number + attr_reader :phone end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id + # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. attr_reader :client_secret + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # If present, this property tells you the last error encountered when processing the verification. attr_reader :last_error + # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) attr_reader :last_verification_report + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # A set of options for the session’s verification checks. attr_reader :options + # Details provided about the user being verified. These details may be shown to the user. attr_reader :provided_details + # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. attr_reader :redaction + # Token referencing a Customer resource. attr_reader :related_customer + # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). attr_reader :status + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. attr_reader :type + # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. attr_reader :url + # The configuration token of a verification flow from the dashboard. attr_reader :verification_flow + # The user’s verified data. attr_reader :verified_outputs diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 6d6a7f62b..9082e50c6 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -51,75 +51,216 @@ def self.object_name nested_resource_class_methods :payment, operations: %i[retrieve list] class AmountsDue < Stripe::StripeObject - attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status + # Incremental amount due for this payment in cents (or local equivalent). + attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. + attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. + attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Date on which a payment plan’s payment is due. + attr_reader :due_date + # Timestamp when the payment was paid. + attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` + attr_reader :status end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability, :status + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. + attr_reader :status end class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class CustomerAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end class FromInvoice < Stripe::StripeObject - attr_reader :action, :invoice + # The relation between this invoice and the cloned invoice + attr_reader :action + # The invoice that was cloned. + attr_reader :invoice end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class LastFinalizationError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. attr_reader :transaction_type end - attr_reader :mandate_options, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. attr_reader :enabled end - attr_reader :installments, :request_three_d_secure + # Attribute for field installments + attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -129,107 +270,247 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end - attr_reader :filters, :permissions, :prefetch + # Attribute for field filters + attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch end - attr_reader :financial_connections, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :us_bank_account end - attr_reader :default_mandate, :payment_method_options, :payment_method_types + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. attr_reader :page_size end - attr_reader :amount_tax_display, :pdf, :template, :template_version + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + attr_reader :amount_tax_display + # Invoice pdf rendering options + attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. + attr_reader :template + # Version of the rendering template that the invoice is using. + attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this invoice. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject - attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at + # The time that the invoice draft was finalized. + attr_reader :finalized_at + # The time that the invoice was marked uncollectible. + attr_reader :marked_uncollectible_at + # The time that the invoice was paid. + attr_reader :paid_at + # The time that the invoice was voided. + attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - attr_reader :behavior, :resumes_at + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_reader :behavior + # The time after which the subscription will resume collecting payments. + attr_reader :resumes_at end - attr_reader :metadata, :pause_collection + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - attr_reader :line_item_ids, :usage_gte + # The IDs of the line items that triggered the threshold invoice. + attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. + attr_reader :usage_gte end - attr_reader :amount_gte, :item_reasons + # The total invoice amount threshold boundary if it triggered the threshold invoice. + attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. + attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject - attr_reader :amount, :margin + # The amount, in cents (or local equivalent), of the reduction in line item amount. + attr_reader :amount + # The margin that was applied to get this margin amount. + attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # The margin that was applied to get this pretax credit amount. + attr_reader :margin + # Type of the pretax credit amount referenced. + attr_reader :type end class TotalTaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country + # The public name of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_name + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. attr_reader :account_tax_ids + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. attr_reader :amount_due + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. attr_reader :amount_overpaid + # The amount, in cents (or local equivalent), that was paid. attr_reader :amount_paid + # The difference between amount_due and amount_paid, in cents (or local equivalent). attr_reader :amount_remaining + # This is the sum of all the shipping amounts. attr_reader :amount_shipping + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. attr_reader :amounts_due + # ID of the Connect Application that created the invoice. attr_reader :application + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. attr_reader :application_fee_amount + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. attr_reader :attempt_count + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. attr_reader :attempted + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. attr_reader :auto_advance + # Attribute for field automatic_tax attr_reader :automatic_tax + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. attr_reader :automatically_finalizes_at + # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -240,150 +521,223 @@ class TransferData < Stripe::StripeObject # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. attr_reader :billing_reason + # ID of the latest charge generated for this invoice, if any. attr_reader :charge + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. attr_reader :collection_method + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Custom fields displayed on the invoice. attr_reader :custom_fields + # The ID of the customer who will be billed. attr_reader :customer + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_address + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_email + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_name + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_phone + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_shipping + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_exempt + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_ids + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. attr_reader :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. attr_reader :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source + # The tax rates applied to this invoice, if any. attr_reader :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. attr_reader :description + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. attr_reader :discount + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. attr_reader :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. attr_reader :effective_at + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :ending_balance + # Footer displayed on the invoice. attr_reader :footer + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. attr_reader :from_invoice + # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. attr_reader :hosted_invoice_url + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. attr_reader :id + # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :invoice_pdf + # Attribute for field issuer attr_reader :issuer + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. attr_reader :last_finalization_error + # The ID of the most recent non-draft revision of this invoice attr_reader :latest_revision + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. attr_reader :next_payment_attempt + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. attr_reader :number + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. attr_reader :on_behalf_of + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. attr_reader :paid + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. attr_reader :paid_out_of_band + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. attr_reader :payment_intent + # Attribute for field payment_settings attr_reader :payment_settings + # Payments for this invoice attr_reader :payments + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_end + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_start + # Total amount of all post-payment credit notes issued for this invoice. attr_reader :post_payment_credit_notes_amount + # Total amount of all pre-payment credit notes issued for this invoice. attr_reader :pre_payment_credit_notes_amount + # The quote this invoice was generated from. attr_reader :quote + # This is the transaction number that appears on email receipts sent for this invoice. attr_reader :receipt_number + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. attr_reader :rendering + # The details of the cost of shipping, including the ShippingRate applied on the invoice. attr_reader :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. attr_reader :shipping_details + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. attr_reader :starting_balance + # Extra information about an invoice for the customer's credit card statement. attr_reader :statement_descriptor + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # The subscription that this invoice was prepared for, if any. attr_reader :subscription + # Details about the subscription that created this invoice. attr_reader :subscription_details + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. attr_reader :subscription_proration_date + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated attr_reader :subtotal + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated attr_reader :subtotal_excluding_tax + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. attr_reader :tax + # ID of the test clock this invoice belongs to. attr_reader :test_clock + # Attribute for field threshold_reason attr_reader :threshold_reason + # Total after discounts and taxes. attr_reader :total + # The aggregate amounts calculated per discount across all line items. attr_reader :total_discount_amounts + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. attr_reader :total_excluding_tax + # The aggregate amounts calculated per margin across all line items. attr_reader :total_margin_amounts + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. attr_reader :total_pretax_credit_amounts + # The aggregate amounts calculated per tax rate for all line items. attr_reader :total_tax_amounts + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. attr_reader :transfer_data + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. attr_reader :webhooks_delivered_at + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index 156c10f52..b2eddba37 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -25,56 +25,83 @@ def self.object_name end class Period < Stripe::StripeObject - attr_reader :end, :start + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_reader :end + # The start of the period. This value is inclusive. + attr_reader :start end # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The ID of the customer who will be billed when this invoice item is billed. attr_reader :customer + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :date + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # If true, discounts will apply to this invoice item. Always false for prorations. attr_reader :discountable + # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # Unique identifier for the object. attr_reader :id + # The ID of the invoice this invoice item belongs to. attr_reader :invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. attr_reader :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field period attr_reader :period + # If the invoice item is a proration, the plan of the subscription that the proration was computed for. attr_reader :plan + # The price of the invoice item. attr_reader :price + # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. attr_reader :proration + # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. attr_reader :quantity + # The subscription that this invoice item has been created for, if any. attr_reader :subscription + # The subscription item that this invoice item has been created for, if any. attr_reader :subscription_item + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. attr_reader :tax_rates + # ID of the test clock this invoice item belongs to. attr_reader :test_clock + # Unit amount (in the `currency` specified) of the invoice item. attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. attr_reader :unit_amount_decimal + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index 99f75b072..9f93f6148 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -14,85 +14,143 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class MarginAmount < Stripe::StripeObject - attr_reader :amount, :margin + # The amount, in cents (or local equivalent), of the reduction in line item amount. + attr_reader :amount + # The margin that was applied to get this margin amount. + attr_reader :margin end class Period < Stripe::StripeObject - attr_reader :end, :start + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_reader :end + # The start of the period. This value is inclusive. + attr_reader :start end class PretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # The margin that was applied to get this pretax credit amount. + attr_reader :margin + # Type of the pretax credit amount referenced. + attr_reader :type end class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject - attr_reader :invoice, :invoice_line_items + # Invoice containing the credited invoice line items + attr_reader :invoice + # Credited invoice line items + attr_reader :invoice_line_items end + # For a credit proration `line_item`, the original debit line_items to which the credit proration applies. attr_reader :credited_items end class TaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end # The amount, in cents (or local equivalent). attr_reader :amount + # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. attr_reader :amount_excluding_tax + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # The amount of discount calculated per discount for this line item. attr_reader :discount_amounts + # If true, discounts will apply to this line item. Always false for prorations. attr_reader :discountable + # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # Unique identifier for the object. attr_reader :id + # The ID of the invoice that contains this line item. attr_reader :invoice + # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. attr_reader :invoice_item + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The amount of margin calculated per margin for this line item. attr_reader :margin_amounts + # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. attr_reader :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field period attr_reader :period + # The plan of the subscription, if the line item is a subscription or a proration. attr_reader :plan + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. attr_reader :pretax_credit_amounts + # The price of the line item. attr_reader :price + # Whether this is a proration. attr_reader :proration + # Additional details for proration line items attr_reader :proration_details + # The quantity of the subscription, if the line item is a subscription or a proration. attr_reader :quantity + # The subscription that the invoice item pertains to, if any. attr_reader :subscription + # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. attr_reader :subscription_item + # The amount of tax calculated per tax rate for this line item attr_reader :tax_amounts + # The tax rates which apply to the line item. attr_reader :tax_rates + # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. attr_reader :type + # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. attr_reader :unit_amount_excluding_tax diff --git a/lib/stripe/resources/invoice_payment.rb b/lib/stripe/resources/invoice_payment.rb index a717aebf7..01ae58e0e 100644 --- a/lib/stripe/resources/invoice_payment.rb +++ b/lib/stripe/resources/invoice_payment.rb @@ -10,36 +10,58 @@ def self.object_name end class Payment < Stripe::StripeObject - attr_reader :charge, :payment_intent, :payment_record, :type + # ID of the successful charge for this payment when `type` is `charge`. + attr_reader :charge + # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. + attr_reader :payment_intent + # ID of the PaymentRecord associated with this payment when `type` is `payment_record`. + attr_reader :payment_record + # Type of payment object associated with this invoice payment. + attr_reader :type end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :paid_at + # The time that the payment was canceled. + attr_reader :canceled_at + # The time that the payment succeeded. + attr_reader :paid_at end # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. attr_reader :amount_overpaid + # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. attr_reader :amount_paid + # Amount intended to be paid toward this invoice, in cents (or local equivalent) attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Unique identifier for the object. attr_reader :id + # The invoice that was paid. attr_reader :invoice + # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. attr_reader :is_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field payment attr_reader :payment + # The status of the payment, one of `open`, `paid`, or `canceled`. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions end diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb index 9f033c1a3..5246ebdb7 100644 --- a/lib/stripe/resources/invoice_rendering_template.rb +++ b/lib/stripe/resources/invoice_rendering_template.rb @@ -14,18 +14,25 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # A brief description of the template, hidden from customers attr_reader :nickname + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The status of the template, one of `active` or `archived`. attr_reader :status + # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering attr_reader :version diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index cc78edd17..a3a1583d7 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -19,131 +19,292 @@ def self.object_name end class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - attr_reader :alphanumeric_id, :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number + # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + attr_reader :alphanumeric_id + # Driver ID. + attr_reader :driver_id + # Odometer reading. + attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_reader :unspecified_id + # User ID. + attr_reader :user_id + # Vehicle number. + attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - attr_reader :local_amount_decimal, :national_amount_decimal + # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. + attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. + attr_reader :national_amount_decimal end - attr_reader :fuel, :non_fuel, :tax + # Breakdown of fuel portion of the purchase. + attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. + attr_reader :non_fuel + # Information about tax included in this transaction. + attr_reader :tax end - attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_reader :cardholder_prompt_data + # The type of purchase. + attr_reader :purchase_type + # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_reader :reported_breakdown + # The type of fuel service. + attr_reader :service_type end class FraudChallenge < Stripe::StripeObject - attr_reader :channel, :status, :undeliverable_reason + # The method by which the fraud challenge was delivered to the cardholder. + attr_reader :channel + # The status of the fraud challenge. + attr_reader :status + # If the challenge is not deliverable, the reason why. + attr_reader :undeliverable_reason end class Fuel < Stripe::StripeObject - attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_reader :quantity_decimal + # The type of fuel that was purchased. + attr_reader :type + # The units for `quantity_decimal`. + attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_reader :unit_cost_decimal end class MerchantData < Stripe::StripeObject - attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_reader :category + # The merchant category code for the seller’s business + attr_reader :category_code + # City where the seller is located + attr_reader :city + # Country where the seller is located + attr_reader :country + # Name of the seller + attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_reader :network_id + # Postal code where the seller is located + attr_reader :postal_code + # State where the seller is located + attr_reader :state + # An ID assigned by the seller to the location of the sale. + attr_reader :terminal_id + # URL provided by the merchant on a 3DS request + attr_reader :url end class NetworkData < Stripe::StripeObject - attr_reader :acquiring_institution_id, :system_trace_audit_number, :transaction_id + # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. + attr_reader :acquiring_institution_id + # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. + attr_reader :system_trace_audit_number + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + attr_reader :transaction_id end class PendingRequest < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end - attr_reader :amount, :amount_details, :currency, :is_amount_controllable, :merchant_amount, :merchant_currency, :network_risk_score + # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + attr_reader :is_amount_controllable + # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :merchant_amount + # The local currency the merchant is requesting to authorize. + attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + attr_reader :network_risk_score end class RequestHistory < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end - attr_reader :amount, :amount_details, :approved, :authorization_code, :created, :currency, :merchant_amount, :merchant_currency, :network_risk_score, :reason, :reason_message, :requested_at + # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. + attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + # Whether this request was approved. + attr_reader :approved + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + attr_reader :authorization_code + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :merchant_amount + # The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + attr_reader :network_risk_score + # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. + attr_reader :reason + # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. + attr_reader :reason_message + # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. + attr_reader :requested_at end class Treasury < Stripe::StripeObject - attr_reader :received_credits, :received_debits, :transaction + # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization + attr_reader :received_credits + # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization + attr_reader :received_debits + # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization + attr_reader :transaction end class VerificationData < Stripe::StripeObject class AuthenticationExemption < Stripe::StripeObject - attr_reader :claimed_by, :type + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. + attr_reader :claimed_by + # The specific exemption claimed for this authorization. + attr_reader :type end class ThreeDSecure < Stripe::StripeObject + # The outcome of the 3D Secure authentication request. attr_reader :result end - attr_reader :address_line1_check, :address_postal_code_check, :authentication_exemption, :cvc_check, :expiry_check, :postal_code, :three_d_secure + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + attr_reader :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + attr_reader :address_postal_code_check + # The exemption applied to this authorization. + attr_reader :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. + attr_reader :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. + attr_reader :expiry_check + # The postal code submitted as part of the authorization used for postal code verification. + attr_reader :postal_code + # 3D Secure details. + attr_reader :three_d_secure end # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_details + # Whether the authorization has been approved. attr_reader :approved + # How the card details were provided. attr_reader :authorization_method + # List of balance transactions associated with this authorization. attr_reader :balance_transactions + # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. attr_reader :card + # The cardholder to whom this authorization belongs. attr_reader :cardholder + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Fleet-specific information for authorizations using Fleet cards. attr_reader :fleet + # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. attr_reader :fraud_challenges + # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. attr_reader :fuel + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. attr_reader :merchant_amount + # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :merchant_currency + # Attribute for field merchant_data attr_reader :merchant_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Details about the authorization, such as identifiers, set by the card network. attr_reader :network_data + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. attr_reader :pending_request + # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. attr_reader :request_history + # The current status of the authorization in its lifecycle. attr_reader :status + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. attr_reader :token + # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. attr_reader :transactions + # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). attr_reader :treasury + # Attribute for field verification_data attr_reader :verification_data + # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. attr_reader :verified_by_fraud_challenge + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. attr_reader :wallet diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb index aa8cd2bd0..9f689fc52 100644 --- a/lib/stripe/resources/issuing/card.rb +++ b/lib/stripe/resources/issuing/card.rb @@ -16,87 +16,190 @@ def self.object_name class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class AddressValidation < Stripe::StripeObject class NormalizedAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :mode, :normalized_address, :result + # The address validation capabilities to use. + attr_reader :mode + # The normalized shipping address. + attr_reader :normalized_address + # The validation result for the shipping address. + attr_reader :result end class Customs < Stripe::StripeObject + # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. attr_reader :eori_number end - attr_reader :address, :address_validation, :carrier, :customs, :eta, :name, :phone_number, :require_signature, :service, :status, :tracking_number, :tracking_url, :type + # Attribute for field address + attr_reader :address + # Address validation details for the shipment. + attr_reader :address_validation + # The delivery company that shipped a card. + attr_reader :carrier + # Additional information that may be required for clearing customs. + attr_reader :customs + # A unix timestamp representing a best estimate of when the card will be delivered. + attr_reader :eta + # Recipient name. + attr_reader :name + # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. + attr_reader :phone_number + # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. + attr_reader :require_signature + # Shipment service, such as `standard` or `express`. + attr_reader :service + # The delivery status of the card. + attr_reader :status + # A tracking number for a card shipment. + attr_reader :tracking_number + # A link to the shipping carrier's site where you can view detailed information about a card shipment. + attr_reader :tracking_url + # Packaging options. + attr_reader :type end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - attr_reader :amount, :categories, :interval + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_reader :categories + # Interval (or event) to which the amount applies. + attr_reader :interval end - attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. Always the same as the currency of the card. + attr_reader :spending_limits_currency end class Wallets < Stripe::StripeObject class ApplePay < Stripe::StripeObject - attr_reader :eligible, :ineligible_reason + # Apple Pay Eligibility + attr_reader :eligible + # Reason the card is ineligible for Apple Pay + attr_reader :ineligible_reason end class GooglePay < Stripe::StripeObject - attr_reader :eligible, :ineligible_reason + # Google Pay Eligibility + attr_reader :eligible + # Reason the card is ineligible for Google Pay + attr_reader :ineligible_reason end - attr_reader :apple_pay, :google_pay, :primary_account_identifier + # Attribute for field apple_pay + attr_reader :apple_pay + # Attribute for field google_pay + attr_reader :google_pay + # Unique identifier for a card used with digital wallets + attr_reader :primary_account_identifier end # The brand of the card. attr_reader :brand + # The reason why the card was canceled. attr_reader :cancellation_reason + # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. # # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) attr_reader :cardholder + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. attr_reader :currency + # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. attr_reader :cvc + # The expiration month of the card. attr_reader :exp_month + # The expiration year of the card. attr_reader :exp_year + # The financial account this card is attached to. attr_reader :financial_account + # Unique identifier for the object. attr_reader :id + # The last 4 digits of the card number. attr_reader :last4 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. attr_reader :number + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The personalization design object belonging to this card. attr_reader :personalization_design + # The latest card that replaces this card, if any. attr_reader :replaced_by + # The card this card replaces, if any. attr_reader :replacement_for + # The reason why the previous card needed to be replaced. attr_reader :replacement_reason + # Where and how the card will be shipped. attr_reader :shipping + # Attribute for field spending_controls attr_reader :spending_controls + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. attr_reader :status + # The type of the card. attr_reader :type + # Information relating to digital wallets (like Apple Pay and Google Pay). attr_reader :wallets diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb index ac9a686d2..b593bb223 100644 --- a/lib/stripe/resources/issuing/cardholder.rb +++ b/lib/stripe/resources/issuing/cardholder.rb @@ -18,77 +18,148 @@ def self.object_name class Billing < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end + # Attribute for field address attr_reader :address end class Company < Stripe::StripeObject + # Whether the company's business ID number was provided. attr_reader :tax_id_provided end class Individual < Stripe::StripeObject class CardIssuing < Stripe::StripeObject class UserTermsAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. + attr_reader :date + # The IP address from which the cardholder accepted the Authorized User Terms. + attr_reader :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + attr_reader :user_agent end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. attr_reader :user_terms_acceptance end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :back, :front + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :front end + # An identifying document, either a passport or local ID card. attr_reader :document end - attr_reader :card_issuing, :dob, :first_name, :last_name, :verification + # Information related to the card_issuing program for this cardholder. + attr_reader :card_issuing + # The date of birth of this cardholder. + attr_reader :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_reader :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_reader :last_name + # Government-issued ID document for this cardholder. + attr_reader :verification end class Requirements < Stripe::StripeObject - attr_reader :disabled_reason, :past_due + # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + attr_reader :disabled_reason + # Array of fields that need to be collected in order to verify and re-enable the cardholder. + attr_reader :past_due end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - attr_reader :amount, :categories, :interval + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_reader :categories + # Interval (or event) to which the amount applies. + attr_reader :interval end - attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. + attr_reader :spending_limits_currency end # Attribute for field billing attr_reader :billing + # Additional information about a `company` cardholder. attr_reader :company + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The cardholder's email address. attr_reader :email + # Unique identifier for the object. attr_reader :id + # Additional information about an `individual` cardholder. attr_reader :individual + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The cardholder's name. This will be printed on cards issued to them. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. attr_reader :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. attr_reader :preferred_locales + # Attribute for field requirements attr_reader :requirements + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. attr_reader :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. attr_reader :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. attr_reader :type diff --git a/lib/stripe/resources/issuing/credit_underwriting_record.rb b/lib/stripe/resources/issuing/credit_underwriting_record.rb index d5f51d632..100f27257 100644 --- a/lib/stripe/resources/issuing/credit_underwriting_record.rb +++ b/lib/stripe/resources/issuing/credit_underwriting_record.rb @@ -15,59 +15,107 @@ def self.object_name end class Application < Stripe::StripeObject - attr_reader :application_method, :purpose, :submitted_at + # The channel through which the applicant has submitted their application. + attr_reader :application_method + # Scope of demand made by the applicant. + attr_reader :purpose + # Date when the applicant submitted their application. + attr_reader :submitted_at end class CreditUser < Stripe::StripeObject - attr_reader :email, :name + # Email of the applicant or accountholder. + attr_reader :email + # Full name of the company or person. + attr_reader :name end class Decision < Stripe::StripeObject class ApplicationRejected < Stripe::StripeObject - attr_reader :reason_other_explanation, :reasons + # Details about the `reasons.other` when present. + attr_reader :reason_other_explanation + # List of reasons why the application was rejected up to 4 reasons, in order of importance. + attr_reader :reasons end class CreditLimitApproved < Stripe::StripeObject - attr_reader :amount, :currency + # Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency end class CreditLimitDecreased < Stripe::StripeObject - attr_reader :amount, :currency, :reason_other_explanation, :reasons + # Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Details about the `reasons.other` when present. + attr_reader :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + attr_reader :reasons end class CreditLineClosed < Stripe::StripeObject - attr_reader :reason_other_explanation, :reasons + # Details about the `reasons.other` when present. + attr_reader :reason_other_explanation + # List of reasons why the existing account was closed, up to 4 reasons, in order of importance. + attr_reader :reasons end - attr_reader :application_rejected, :credit_limit_approved, :credit_limit_decreased, :credit_line_closed, :type + # Details about a decision application_rejected. + attr_reader :application_rejected + # Details about a decision credit_limit_approved. + attr_reader :credit_limit_approved + # Details about a decision credit_limit_decreased. + attr_reader :credit_limit_decreased + # Details about a decision credit_line_closed. + attr_reader :credit_line_closed + # Outcome of the decision. + attr_reader :type end class UnderwritingException < Stripe::StripeObject - attr_reader :explanation, :original_decision_type + # Written explanation for the exception. + attr_reader :explanation + # The decision before the exception was applied. + attr_reader :original_decision_type end # For decisions triggered by an application, details about the submission. attr_reader :application + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The event that triggered the underwriting. attr_reader :created_from + # Attribute for field credit_user attr_reader :credit_user + # Date when a decision was made. attr_reader :decided_at + # Details about the decision. attr_reader :decision + # For underwriting initiated by an application, a decision must be taken 30 days after the submission. attr_reader :decision_deadline + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). attr_reader :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. attr_reader :underwriting_exception diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb index fc2cf4e2f..e130c8adb 100644 --- a/lib/stripe/resources/issuing/dispute.rb +++ b/lib/stripe/resources/issuing/dispute.rb @@ -18,66 +18,170 @@ def self.object_name class Evidence < Stripe::StripeObject class Canceled < Stripe::StripeObject - attr_reader :additional_documentation, :canceled_at, :cancellation_policy_provided, :cancellation_reason, :expected_at, :explanation, :product_description, :product_type, :return_status, :returned_at + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Date when order was canceled. + attr_reader :canceled_at + # Whether the cardholder was provided with a cancellation policy. + attr_reader :cancellation_policy_provided + # Reason for canceling the order. + attr_reader :cancellation_reason + # Date when the cardholder expected to receive the product. + attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Description of the merchandise or service that was purchased. + attr_reader :product_description + # Whether the product was a merchandise or service. + attr_reader :product_type + # Result of cardholder's attempt to return the product. + attr_reader :return_status + # Date when the product was returned or attempted to be returned. + attr_reader :returned_at end class Duplicate < Stripe::StripeObject - attr_reader :additional_documentation, :card_statement, :cash_receipt, :check_image, :explanation, :original_transaction + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + attr_reader :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + attr_reader :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + attr_reader :check_image + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + attr_reader :original_transaction end class Fraudulent < Stripe::StripeObject - attr_reader :additional_documentation, :explanation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation end class MerchandiseNotAsDescribed < Stripe::StripeObject - attr_reader :additional_documentation, :explanation, :received_at, :return_description, :return_status, :returned_at + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Date when the product was received. + attr_reader :received_at + # Description of the cardholder's attempt to return the product. + attr_reader :return_description + # Result of cardholder's attempt to return the product. + attr_reader :return_status + # Date when the product was returned or attempted to be returned. + attr_reader :returned_at end class NoValidAuthorization < Stripe::StripeObject - attr_reader :additional_documentation, :explanation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation end class NotReceived < Stripe::StripeObject - attr_reader :additional_documentation, :expected_at, :explanation, :product_description, :product_type + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Date when the cardholder expected to receive the product. + attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Description of the merchandise or service that was purchased. + attr_reader :product_description + # Whether the product was a merchandise or service. + attr_reader :product_type end class Other < Stripe::StripeObject - attr_reader :additional_documentation, :explanation, :product_description, :product_type + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Description of the merchandise or service that was purchased. + attr_reader :product_description + # Whether the product was a merchandise or service. + attr_reader :product_type end class ServiceNotAsDescribed < Stripe::StripeObject - attr_reader :additional_documentation, :canceled_at, :cancellation_reason, :explanation, :received_at + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Date when order was canceled. + attr_reader :canceled_at + # Reason for canceling the order. + attr_reader :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Date when the product was received. + attr_reader :received_at end - attr_reader :canceled, :duplicate, :fraudulent, :merchandise_not_as_described, :no_valid_authorization, :not_received, :other, :reason, :service_not_as_described + # Attribute for field canceled + attr_reader :canceled + # Attribute for field duplicate + attr_reader :duplicate + # Attribute for field fraudulent + attr_reader :fraudulent + # Attribute for field merchandise_not_as_described + attr_reader :merchandise_not_as_described + # Attribute for field no_valid_authorization + attr_reader :no_valid_authorization + # Attribute for field not_received + attr_reader :not_received + # Attribute for field other + attr_reader :other + # The reason for filing the dispute. Its value will match the field containing the evidence. + attr_reader :reason + # Attribute for field service_not_as_described + attr_reader :service_not_as_described end class Treasury < Stripe::StripeObject - attr_reader :debit_reversal, :received_debit + # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute + attr_reader :debit_reversal + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. + attr_reader :received_debit end # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). attr_reader :amount + # List of balance transactions associated with the dispute. attr_reader :balance_transactions + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The currency the `transaction` was made in. attr_reader :currency + # Attribute for field evidence attr_reader :evidence + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. attr_reader :loss_reason + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Current status of the dispute. attr_reader :status + # The transaction being disputed. attr_reader :transaction + # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts attr_reader :treasury diff --git a/lib/stripe/resources/issuing/dispute_settlement_detail.rb b/lib/stripe/resources/issuing/dispute_settlement_detail.rb index c94ed93cd..8fa27fbca 100644 --- a/lib/stripe/resources/issuing/dispute_settlement_detail.rb +++ b/lib/stripe/resources/issuing/dispute_settlement_detail.rb @@ -14,24 +14,34 @@ def self.object_name # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). attr_reader :amount + # The card used to make the original transaction. attr_reader :card + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The ID of the linked dispute. attr_reader :dispute + # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. attr_reader :event_type + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] attr_reader :network + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ID of the linked card network settlement. attr_reader :settlement diff --git a/lib/stripe/resources/issuing/fraud_liability_debit.rb b/lib/stripe/resources/issuing/fraud_liability_debit.rb index 19872b9fb..1092373fe 100644 --- a/lib/stripe/resources/issuing/fraud_liability_debit.rb +++ b/lib/stripe/resources/issuing/fraud_liability_debit.rb @@ -14,18 +14,25 @@ def self.object_name # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. attr_reader :amount + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The ID of the linked dispute. attr_reader :dispute + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/issuing/personalization_design.rb b/lib/stripe/resources/issuing/personalization_design.rb index 06387b16d..d5512f2c7 100644 --- a/lib/stripe/resources/issuing/personalization_design.rb +++ b/lib/stripe/resources/issuing/personalization_design.rb @@ -15,40 +15,65 @@ def self.object_name end class CarrierText < Stripe::StripeObject - attr_reader :footer_body, :footer_title, :header_body, :header_title + # The footer body text of the carrier letter. + attr_reader :footer_body + # The footer title text of the carrier letter. + attr_reader :footer_title + # The header body text of the carrier letter. + attr_reader :header_body + # The header title text of the carrier letter. + attr_reader :header_title end class Preferences < Stripe::StripeObject - attr_reader :is_default, :is_platform_default + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + attr_reader :is_default + # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + attr_reader :is_platform_default end class RejectionReasons < Stripe::StripeObject - attr_reader :card_logo, :carrier_text + # The reason(s) the card logo was rejected. + attr_reader :card_logo + # The reason(s) the carrier text was rejected. + attr_reader :carrier_text end # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. attr_reader :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. attr_reader :carrier_text + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. attr_reader :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Friendly display name. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The physical bundle object belonging to this personalization design. attr_reader :physical_bundle + # Attribute for field preferences attr_reader :preferences + # Attribute for field rejection_reasons attr_reader :rejection_reasons + # Whether this personalization design can be used to create cards. attr_reader :status diff --git a/lib/stripe/resources/issuing/physical_bundle.rb b/lib/stripe/resources/issuing/physical_bundle.rb index 2914698ba..5c994e9b0 100644 --- a/lib/stripe/resources/issuing/physical_bundle.rb +++ b/lib/stripe/resources/issuing/physical_bundle.rb @@ -13,20 +13,31 @@ def self.object_name end class Features < Stripe::StripeObject - attr_reader :card_logo, :carrier_text, :second_line + # The policy for how to use card logo images in a card design with this physical bundle. + attr_reader :card_logo + # The policy for how to use carrier letter text in a card design with this physical bundle. + attr_reader :carrier_text + # The policy for how to use a second line on a card with this physical bundle. + attr_reader :second_line end # Attribute for field features attr_reader :features + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Friendly display name. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Whether this physical bundle can be used to create cards. attr_reader :status + # Whether this physical bundle is a standard Stripe offering or custom-made for you. attr_reader :type diff --git a/lib/stripe/resources/issuing/settlement.rb b/lib/stripe/resources/issuing/settlement.rb index c0c91a1df..400cc26be 100644 --- a/lib/stripe/resources/issuing/settlement.rb +++ b/lib/stripe/resources/issuing/settlement.rb @@ -12,36 +12,52 @@ def self.object_name # The Bank Identification Number reflecting this settlement record. attr_reader :bin + # The date that the transactions are cleared and posted to user's accounts. attr_reader :clearing_date + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Unique identifier for the object. attr_reader :id + # The total interchange received as reimbursement for the transactions. attr_reader :interchange_fees + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The total net amount required to settle with the network. attr_reader :net_total + # The card network for this settlement report. One of ["visa", "maestro"] attr_reader :network + # The total amount of fees owed to the network. attr_reader :network_fees + # The Settlement Identification Number assigned by the network. attr_reader :network_settlement_identifier + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # One of `international` or `uk_national_net`. attr_reader :settlement_service + # The current processing status of this settlement. attr_reader :status + # The total number of transactions reflected in this settlement. attr_reader :transaction_count + # The total transaction amount reflected in this settlement. attr_reader :transaction_volume end diff --git a/lib/stripe/resources/issuing/token.rb b/lib/stripe/resources/issuing/token.rb index 22d116c94..5ec8cb2cf 100644 --- a/lib/stripe/resources/issuing/token.rb +++ b/lib/stripe/resources/issuing/token.rb @@ -15,47 +15,114 @@ def self.object_name class NetworkData < Stripe::StripeObject class Device < Stripe::StripeObject - attr_reader :device_fingerprint, :ip_address, :location, :name, :phone_number, :type + # An obfuscated ID derived from the device ID. + attr_reader :device_fingerprint + # The IP address of the device at provisioning time. + attr_reader :ip_address + # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. + attr_reader :location + # The name of the device used for tokenization. + attr_reader :name + # The phone number of the device used for tokenization. + attr_reader :phone_number + # The type of device used for tokenization. + attr_reader :type end class Mastercard < Stripe::StripeObject - attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_requestor_name + # A unique reference ID from MasterCard to represent the card account number. + attr_reader :card_reference_id + # The network-unique identifier for the token. + attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to MasterCard. + attr_reader :token_requestor_id + # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + attr_reader :token_requestor_name end class Visa < Stripe::StripeObject - attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_risk_score + # A unique reference ID from Visa to represent the card account number. + attr_reader :card_reference_id + # The network-unique identifier for the token. + attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to Visa. + attr_reader :token_requestor_id + # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. + attr_reader :token_risk_score end class WalletProvider < Stripe::StripeObject class CardholderAddress < Stripe::StripeObject - attr_reader :line1, :postal_code + # The street address of the cardholder tokenizing the card. + attr_reader :line1 + # The postal code of the cardholder tokenizing the card. + attr_reader :postal_code end - attr_reader :account_id, :account_trust_score, :card_number_source, :cardholder_address, :cardholder_name, :device_trust_score, :hashed_account_email_address, :reason_codes, :suggested_decision, :suggested_decision_version + # The wallet provider-given account ID of the digital wallet the token belongs to. + attr_reader :account_id + # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. + attr_reader :account_trust_score + # The method used for tokenizing a card. + attr_reader :card_number_source + # Attribute for field cardholder_address + attr_reader :cardholder_address + # The name of the cardholder tokenizing the card. + attr_reader :cardholder_name + # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. + attr_reader :device_trust_score + # The hashed email address of the cardholder's account with the wallet provider. + attr_reader :hashed_account_email_address + # The reasons for suggested tokenization given by the card network. + attr_reader :reason_codes + # The recommendation on responding to the tokenization request. + attr_reader :suggested_decision + # The version of the standard for mapping reason codes followed by the wallet provider. + attr_reader :suggested_decision_version end - attr_reader :device, :mastercard, :type, :visa, :wallet_provider + # Attribute for field device + attr_reader :device + # Attribute for field mastercard + attr_reader :mastercard + # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + attr_reader :type + # Attribute for field visa + attr_reader :visa + # Attribute for field wallet_provider + attr_reader :wallet_provider end # Card associated with this token. attr_reader :card + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The hashed ID derived from the device ID from the card network associated with the token. attr_reader :device_fingerprint + # Unique identifier for the object. attr_reader :id + # The last four digits of the token. attr_reader :last4 + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The token service provider / card network associated with the token. attr_reader :network + # Attribute for field network_data attr_reader :network_data + # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. attr_reader :network_updated_at + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The usage state of the token. attr_reader :status + # The digital wallet for this token, if one was used. attr_reader :wallet_provider diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index 8ff91af19..23bda1310 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -18,108 +18,236 @@ def self.object_name end class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end class MerchantData < Stripe::StripeObject - attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_reader :category + # The merchant category code for the seller’s business + attr_reader :category_code + # City where the seller is located + attr_reader :city + # Country where the seller is located + attr_reader :country + # Name of the seller + attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_reader :network_id + # Postal code where the seller is located + attr_reader :postal_code + # State where the seller is located + attr_reader :state + # An ID assigned by the seller to the location of the sale. + attr_reader :terminal_id + # URL provided by the merchant on a 3DS request + attr_reader :url end class NetworkData < Stripe::StripeObject - attr_reader :authorization_code, :processing_date, :transaction_id + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + attr_reader :authorization_code + # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + attr_reader :processing_date + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + attr_reader :transaction_id end class PurchaseDetails < Stripe::StripeObject class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - attr_reader :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number + # Driver ID. + attr_reader :driver_id + # Odometer reading. + attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_reader :unspecified_id + # User ID. + attr_reader :user_id + # Vehicle number. + attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - attr_reader :local_amount_decimal, :national_amount_decimal + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_reader :national_amount_decimal end - attr_reader :fuel, :non_fuel, :tax + # Breakdown of fuel portion of the purchase. + attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. + attr_reader :non_fuel + # Information about tax included in this transaction. + attr_reader :tax end - attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type + # Answers to prompts presented to cardholder at point of sale. + attr_reader :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_reader :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_reader :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_reader :service_type end class Flight < Stripe::StripeObject class Segment < Stripe::StripeObject - attr_reader :arrival_airport_code, :carrier, :departure_airport_code, :flight_number, :service_class, :stopover_allowed + # The three-letter IATA airport code of the flight's destination. + attr_reader :arrival_airport_code + # The airline carrier code. + attr_reader :carrier + # The three-letter IATA airport code that the flight departed from. + attr_reader :departure_airport_code + # The flight number. + attr_reader :flight_number + # The flight's service class. + attr_reader :service_class + # Whether a stopover is allowed on this flight. + attr_reader :stopover_allowed end - attr_reader :departure_at, :passenger_name, :refundable, :segments, :travel_agency + # The time that the flight departed. + attr_reader :departure_at + # The name of the passenger. + attr_reader :passenger_name + # Whether the ticket is refundable. + attr_reader :refundable + # The legs of the trip. + attr_reader :segments + # The travel agency that issued the ticket. + attr_reader :travel_agency end class Fuel < Stripe::StripeObject - attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_reader :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_reader :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_reader :unit_cost_decimal end class Lodging < Stripe::StripeObject - attr_reader :check_in_at, :nights + # The time of checking into the lodging. + attr_reader :check_in_at + # The number of nights stayed at the lodging. + attr_reader :nights end class Receipt < Stripe::StripeObject - attr_reader :description, :quantity, :total, :unit_cost + # The description of the item. The maximum length of this field is 26 characters. + attr_reader :description + # The quantity of the item. + attr_reader :quantity + # The total for this line item in cents. + attr_reader :total + # The unit cost of the item in cents. + attr_reader :unit_cost end - attr_reader :fleet, :flight, :fuel, :lodging, :receipt, :reference + # Fleet-specific information for transactions using Fleet cards. + attr_reader :fleet + # Information about the flight that was purchased with this transaction. + attr_reader :flight + # Information about fuel that was purchased with this transaction. + attr_reader :fuel + # Information about lodging that was purchased with this transaction. + attr_reader :lodging + # The line items in the purchase. + attr_reader :receipt + # A merchant-specific order number. + attr_reader :reference end class Treasury < Stripe::StripeObject - attr_reader :received_credit, :received_debit + # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund + attr_reader :received_credit + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture + attr_reader :received_debit end # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_details + # The `Authorization` object that led to this transaction. attr_reader :authorization + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. attr_reader :balance_transaction + # The card used to make this transaction. attr_reader :card + # The cardholder to whom this transaction belongs. attr_reader :cardholder + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # If you've disputed the transaction, the ID of the dispute. attr_reader :dispute + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. attr_reader :merchant_amount + # The currency with which the merchant is taking payment. attr_reader :merchant_currency + # Attribute for field merchant_data attr_reader :merchant_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Details about the transaction, such as processing dates, set by the card network. attr_reader :network_data + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Additional purchase information that is optionally provided by the merchant. attr_reader :purchase_details + # Attribute for field settlement attr_reader :settlement + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. attr_reader :token + # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts attr_reader :treasury + # The nature of the transaction. attr_reader :type + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. attr_reader :wallet diff --git a/lib/stripe/resources/line_item.rb b/lib/stripe/resources/line_item.rb index ec97ee4f1..a9af7425d 100644 --- a/lib/stripe/resources/line_item.rb +++ b/lib/stripe/resources/line_item.rb @@ -10,38 +10,65 @@ def self.object_name end class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end # Total discount amount applied. If no discounts were applied, defaults to 0. attr_reader :amount_discount + # Total before any discounts or taxes are applied. attr_reader :amount_subtotal + # Total tax amount applied. If no tax was applied, defaults to 0. attr_reader :amount_tax + # Total after discounts and taxes. attr_reader :amount_total + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. attr_reader :description + # The discounts applied to the line item. attr_reader :discounts + # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The price used to generate the line item. attr_reader :price + # The ID of the product for this line item. # # This will always be the same as `price.product`. attr_reader :product + # The quantity of products being purchased. attr_reader :quantity + # The taxes applied to the line item. attr_reader :taxes end diff --git a/lib/stripe/resources/login_link.rb b/lib/stripe/resources/login_link.rb index ec3d624ec..268beef08 100644 --- a/lib/stripe/resources/login_link.rb +++ b/lib/stripe/resources/login_link.rb @@ -11,8 +11,10 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The URL for the login link. attr_reader :url diff --git a/lib/stripe/resources/mandate.rb b/lib/stripe/resources/mandate.rb index c1cca7a8c..54037a6a6 100644 --- a/lib/stripe/resources/mandate.rb +++ b/lib/stripe/resources/mandate.rb @@ -13,26 +13,51 @@ class CustomerAcceptance < Stripe::StripeObject class Offline < Stripe::StripeObject; end class Online < Stripe::StripeObject - attr_reader :ip_address, :user_agent + # The customer accepts the mandate from this IP address. + attr_reader :ip_address + # The customer accepts the mandate using the user agent of the browser. + attr_reader :user_agent end - attr_reader :accepted_at, :offline, :online, :type + # The time that the customer accepts the mandate. + attr_reader :accepted_at + # Attribute for field offline + attr_reader :offline + # Attribute for field online + attr_reader :online + # The mandate includes the type of customer acceptance information, such as: `online` or `offline`. + attr_reader :type end class MultiUse < Stripe::StripeObject; end class PaymentMethodDetails < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - attr_reader :default_for, :interval_description, :payment_schedule, :transaction_type + # List of Stripe products where this mandate can be selected automatically. + attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. attr_reader :url end class BacsDebit < Stripe::StripeObject - attr_reader :network_status, :reference, :revocation_reason, :url + # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + attr_reader :network_status + # The unique reference identifying the mandate on the Bacs network. + attr_reader :reference + # When the mandate is revoked on the Bacs network this field displays the reason for the revocation. + attr_reader :revocation_reason + # The URL that will contain the mandate that the customer has signed. + attr_reader :url end class Card < Stripe::StripeObject; end @@ -42,48 +67,115 @@ class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - attr_reader :billing_agreement_id, :fingerprint, :payer_id, :verified_email + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_reader :billing_agreement_id + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + attr_reader :fingerprint + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email end class Payto < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_reader :start_date end class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject - attr_reader :reference, :url + # The unique reference of the mandate. + attr_reader :reference + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + attr_reader :url end class UsBankAccount < Stripe::StripeObject + # Mandate collection method attr_reader :collection_method end - attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :card, :cashapp, :kakao_pay, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :type, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field card + attr_reader :card + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class SingleUse < Stripe::StripeObject - attr_reader :amount, :currency + # The amount of the payment on a single use mandate. + attr_reader :amount + # The currency of the payment on a single use mandate. + attr_reader :currency end # Attribute for field customer_acceptance attr_reader :customer_acceptance + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Attribute for field multi_use attr_reader :multi_use + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) that the mandate is intended for. attr_reader :on_behalf_of + # ID of the payment method associated with this mandate. attr_reader :payment_method + # Attribute for field payment_method_details attr_reader :payment_method_details + # Attribute for field single_use attr_reader :single_use + # The mandate status indicates whether or not you can use it to initiate a payment. attr_reader :status + # The type of the mandate. attr_reader :type end diff --git a/lib/stripe/resources/margin.rb b/lib/stripe/resources/margin.rb index 3724a5b7d..53f04f187 100644 --- a/lib/stripe/resources/margin.rb +++ b/lib/stripe/resources/margin.rb @@ -16,20 +16,28 @@ def self.object_name # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. attr_reader :active + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Name of the margin that's displayed on, for example, invoices. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. attr_reader :percent_off + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated diff --git a/lib/stripe/resources/order.rb b/lib/stripe/resources/order.rb index f1a953c69..d59a6b32a 100644 --- a/lib/stripe/resources/order.rb +++ b/lib/stripe/resources/order.rb @@ -18,202 +18,559 @@ def self.object_name end class AutomaticTax < Stripe::StripeObject - attr_reader :enabled, :status + # Whether Stripe automatically computes tax on this Order. + attr_reader :enabled + # The status of the most recent automated tax calculation for this Order. + attr_reader :status end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address for the order. + attr_reader :address + # Email address for the order. + attr_reader :email + # Full name for the order. + attr_reader :name + # Billing phone number for the order (including extension). + attr_reader :phone end class Credit < Stripe::StripeObject class GiftCard < Stripe::StripeObject + # The token of the gift card applied to the order attr_reader :card end - attr_reader :amount, :gift_card, :ineligible_line_items, :type + # The amount of this credit to apply to the order. + attr_reader :amount + # Details for a gift card. + attr_reader :gift_card + # Line items on this order that are ineligible for this credit + attr_reader :ineligible_line_items + # The type of credit to apply to the order, only `gift_card` currently supported. + attr_reader :type end class Payment < Stripe::StripeObject class Settings < Stripe::StripeObject class AutomaticPaymentMethods < Stripe::StripeObject + # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). attr_reader :enabled end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :mandate_options, :setup_future_usage, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class AfterpayClearpay < Stripe::StripeObject - attr_reader :capture_method, :reference, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + attr_reader :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Card < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :requested_address_types, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type, :setup_future_usage + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. + attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Link < Stripe::StripeObject - attr_reader :capture_method, :persistent_token, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Oxxo < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :behavior + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :amount + # The tax behavior for the line item. + attr_reader :behavior end - attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount + # Type of the line item. + attr_reader :category + # Description of the line item. + attr_reader :description + # Descriptive name of the line item. + attr_reader :name + # Quantity of the line item. Cannot be a negative number. + attr_reader :quantity + # Client facing stock keeping unit, article number or similar. + attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + attr_reader :sold_by + # Attribute for field tax + attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :unit_amount end - attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # The line items purchased by the customer. + attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. + attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the SOFORT authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class WechatPay < Stripe::StripeObject - attr_reader :app_id, :client, :setup_future_usage + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_reader :app_id + # The client type that the end customer will pay from + attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end - attr_reader :acss_debit, :afterpay_clearpay, :alipay, :bancontact, :card, :customer_balance, :ideal, :klarna, :link, :oxxo, :p24, :paypal, :sepa_debit, :sofort, :wechat_pay + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field card + attr_reader :card + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field ideal + attr_reader :ideal + # Attribute for field klarna + attr_reader :klarna + # Attribute for field link + attr_reader :link + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field paypal + attr_reader :paypal + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # Attribute for field wechat_pay + attr_reader :wechat_pay end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_reader :amount + # ID of the Connected account receiving the transfer. + attr_reader :destination end - attr_reader :application_fee_amount, :automatic_payment_methods, :payment_method_options, :payment_method_types, :return_url, :statement_descriptor, :statement_descriptor_suffix, :transfer_data + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_reader :application_fee_amount + # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. + attr_reader :automatic_payment_methods + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + attr_reader :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_reader :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + attr_reader :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + attr_reader :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + attr_reader :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + attr_reader :transfer_data end - attr_reader :payment_intent, :settings, :status + # ID of the payment intent associated with this order. Null when the order is `open`. + attr_reader :payment_intent + # Settings describing how the order should configure generated PaymentIntents. + attr_reader :settings + # The status of the underlying payment associated with this order, if any. Null when the order is `open`. + attr_reader :status end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this order. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :name, :phone + # Recipient shipping address. Required if the order includes products that are shippable. + attr_reader :address + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone end class TaxDetails < Stripe::StripeObject class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :tax_exempt, :tax_ids + # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + attr_reader :tax_exempt + # The purchaser's tax IDs to be used in calculation of tax for this Order. + attr_reader :tax_ids end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_credit, :amount_discount, :amount_shipping, :amount_tax, :breakdown + # Attribute for field amount_credit + attr_reader :amount_credit + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end # Attribute for field amount_remaining attr_reader :amount_remaining + # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). attr_reader :amount_subtotal + # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). attr_reader :amount_total + # ID of the Connect application that created the Order, if any. attr_reader :application + # Attribute for field automatic_tax attr_reader :automatic_tax + # Customer billing details associated with the order. attr_reader :billing_details + # The client secret of this Order. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. attr_reader :client_secret + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The credits applied to the Order. At most 10 credits can be applied to an Order. attr_reader :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The customer which this orders belongs to. attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # Unique identifier for the object. attr_reader :id + # A recent IP address of the purchaser used for tax reporting and tax location inference. attr_reader :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field payment attr_reader :payment + # The details of the customer cost of shipping, including the customer chosen ShippingRate. attr_reader :shipping_cost + # Customer shipping information associated with the order. attr_reader :shipping_details + # The overall status of the order. attr_reader :status + # Attribute for field tax_details attr_reader :tax_details + # Attribute for field total_details attr_reader :total_details diff --git a/lib/stripe/resources/payment_attempt_record.rb b/lib/stripe/resources/payment_attempt_record.rb index 7b5bf5829..2efa232a4 100644 --- a/lib/stripe/resources/payment_attempt_record.rb +++ b/lib/stripe/resources/payment_attempt_record.rb @@ -15,75 +15,153 @@ def self.object_name end class AmountCanceled < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountFailed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountGuaranteed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountRequested < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class CustomerDetails < Stripe::StripeObject - attr_reader :customer, :email, :name, :phone + # ID of the Stripe Customer associated with this payment. + attr_reader :customer + # The customer's email address. + attr_reader :email + # The customer's name. + attr_reader :name + # The customer's phone number. + attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # A representation of a physical address. + attr_reader :address + # The billing email associated with the method of payment. + attr_reader :email + # The billing name associated with the method of payment. + attr_reader :name + # The billing phone number associated with the method of payment. + attr_reader :phone end class Custom < Stripe::StripeObject - attr_reader :display_name, :type + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_reader :display_name + # The custom payment method type associated with this payment. + attr_reader :type end - attr_reader :billing_details, :custom, :payment_method, :type + # The billing details associated with the method of payment. + attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. + attr_reader :payment_method + # The type of Payment Method used for this payment attempt. + attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :name, :phone + # A representation of a physical address. + attr_reader :address + # The shipping recipient's name. + attr_reader :name + # The shipping recipient's phone number. + attr_reader :phone end # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_canceled + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_failed + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_guaranteed + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Customer information for this payment. attr_reader :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. attr_reader :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Information about the Payment Method debited for this payment. attr_reader :payment_method_details + # ID of the Payment Record this Payment Attempt Record belongs to. attr_reader :payment_record + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. attr_reader :payment_reference + # Shipping information for this payment. attr_reader :shipping_details diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 9416abf90..1513327ba 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -26,589 +26,1803 @@ def self.object_name class AmountDetails < Stripe::StripeObject class Tip < Stripe::StripeObject + # Portion of the amount that corresponds to a tip. attr_reader :amount end + # Attribute for field tip attr_reader :tip end class AsyncWorkflows < Stripe::StripeObject class Inputs < Stripe::StripeObject class Tax < Stripe::StripeObject + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id attr_reader :calculation end + # Attribute for field tax attr_reader :tax end + # Attribute for field inputs attr_reader :inputs end class AutomaticPaymentMethods < Stripe::StripeObject - attr_reader :allow_redirects, :enabled + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + attr_reader :allow_redirects + # Automatically calculates compatible payment methods + attr_reader :enabled end class LastPaymentError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class NextAction < Stripe::StripeObject class AlipayHandleRedirect < Stripe::StripeObject - attr_reader :native_data, :native_url, :return_url, :url + # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. + attr_reader :native_data + # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. + attr_reader :native_url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. + attr_reader :url end class BoletoDisplayDetails < Stripe::StripeObject - attr_reader :expires_at, :hosted_voucher_url, :number, :pdf + # The timestamp after which the boleto expires. + attr_reader :expires_at + # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. + attr_reader :hosted_voucher_url + # The boleto number. + attr_reader :number + # The URL to the downloadable boleto voucher PDF. + attr_reader :pdf end class CardAwaitNotification < Stripe::StripeObject - attr_reader :charge_attempt_at, :customer_approval_required + # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + attr_reader :charge_attempt_at + # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. + attr_reader :customer_approval_required end class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - attr_reader :expires_at, :image_url_png, :image_url_svg + # The date (unix timestamp) when the QR code expires. + attr_reader :expires_at + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end - attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + attr_reader :hosted_instructions_url + # The url for mobile redirect based auth + attr_reader :mobile_auth_url + # Attribute for field qr_code + attr_reader :qr_code end class DisplayBankTransferInstructions < Stripe::StripeObject class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The ABA account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The ABA routing number + attr_reader :routing_number end class Iban < Stripe::StripeObject - attr_reader :account_holder_name, :bic, :country, :iban + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # The BIC/SWIFT code of the account. + attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # The IBAN of the account. + attr_reader :iban end class SortCode < Stripe::StripeObject - attr_reader :account_holder_name, :account_number, :sort_code + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The six-digit sort code + attr_reader :sort_code end class Spei < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :clabe + # The three-digit bank code + attr_reader :bank_code + # The short banking institution name + attr_reader :bank_name + # The CLABE number + attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The SWIFT code + attr_reader :swift_code end class Zengin < Stripe::StripeObject - attr_reader :account_holder_name, :account_number, :account_type, :bank_code, :bank_name, :branch_code, :branch_name + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. + attr_reader :account_type + # The bank code of the account + attr_reader :bank_code + # The bank name of the account + attr_reader :bank_name + # The branch code of the account + attr_reader :branch_code + # The branch name of the account + attr_reader :branch_name end - attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin + # ABA Records contain U.S. bank account details per the ABA format. + attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. + attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. + attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. + attr_reader :spei + # The payment networks supported by this FinancialAddress + attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. + attr_reader :swift + # The type of financial address + attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. + attr_reader :zengin end - attr_reader :amount_remaining, :currency, :financial_addresses, :hosted_instructions_url, :reference, :type + # The remaining amount that needs to be transferred to complete the payment. + attr_reader :amount_remaining + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A list of financial addresses that can be used to fund the customer balance + attr_reader :financial_addresses + # A link to a hosted page that guides your customer through completing the transfer. + attr_reader :hosted_instructions_url + # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + attr_reader :reference + # Type of bank transfer + attr_reader :type end class KonbiniDisplayDetails < Stripe::StripeObject class Stores < Stripe::StripeObject class Familymart < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end class Lawson < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end class Ministop < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end class Seicomart < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end - attr_reader :familymart, :lawson, :ministop, :seicomart + # FamilyMart instruction details. + attr_reader :familymart + # Lawson instruction details. + attr_reader :lawson + # Ministop instruction details. + attr_reader :ministop + # Seicomart instruction details. + attr_reader :seicomart end - attr_reader :expires_at, :hosted_voucher_url, :stores + # The timestamp at which the pending Konbini payment expires. + attr_reader :expires_at + # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. + attr_reader :hosted_voucher_url + # Attribute for field stores + attr_reader :stores end class MultibancoDisplayDetails < Stripe::StripeObject - attr_reader :entity, :expires_at, :hosted_voucher_url, :reference + # Entity number associated with this Multibanco payment. + attr_reader :entity + # The timestamp at which the Multibanco voucher expires. + attr_reader :expires_at + # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + attr_reader :hosted_voucher_url + # Reference number associated with this Multibanco payment. + attr_reader :reference end class OxxoDisplayDetails < Stripe::StripeObject - attr_reader :expires_after, :hosted_voucher_url, :number + # The timestamp after which the OXXO voucher expires. + attr_reader :expires_after + # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. + attr_reader :hosted_voucher_url + # OXXO reference number. + attr_reader :number end class PaynowDisplayQrCode < Stripe::StripeObject - attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. + attr_reader :hosted_instructions_url + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end class PixDisplayQrCode < Stripe::StripeObject - attr_reader :data, :expires_at, :hosted_instructions_url, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The date (unix timestamp) when the PIX expires. + attr_reader :expires_at + # The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + attr_reader :hosted_instructions_url + # The image_url_png string used to render png QR code + attr_reader :image_url_png + # The image_url_svg string used to render svg QR code + attr_reader :image_url_svg end class PromptpayDisplayQrCode < Stripe::StripeObject - attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + attr_reader :hosted_instructions_url + # The PNG path used to render the QR code, can be used as the source in an HTML img tag + attr_reader :image_url_png + # The SVG path used to render the QR code, can be used as the source in an HTML img tag + attr_reader :image_url_svg end class RedirectToUrl < Stripe::StripeObject - attr_reader :return_url, :url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. + attr_reader :url end class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - attr_reader :data, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end - attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + # The URL to the hosted Swish instructions page, which allows customers to view the QR code. + attr_reader :hosted_instructions_url + # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). + attr_reader :mobile_auth_url + # Attribute for field qr_code + attr_reader :qr_code end class VerifyWithMicrodeposits < Stripe::StripeObject - attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type + # The timestamp when the microdeposits are expected to land. + attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. + attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + attr_reader :microdeposit_type end class WechatPayDisplayQrCode < Stripe::StripeObject - attr_reader :data, :hosted_instructions_url, :image_data_url, :image_url_png, :image_url_svg + # The data being used to generate QR code + attr_reader :data + # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. + attr_reader :hosted_instructions_url + # The base64 image data for a pre-generated QR code + attr_reader :image_data_url + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end class WechatPayRedirectToAndroidApp < Stripe::StripeObject - attr_reader :app_id, :nonce_str, :package, :partner_id, :prepay_id, :sign, :timestamp + # app_id is the APP ID registered on WeChat open platform + attr_reader :app_id + # nonce_str is a random string + attr_reader :nonce_str + # package is static value + attr_reader :package + # an unique merchant ID assigned by WeChat Pay + attr_reader :partner_id + # an unique trading ID assigned by WeChat Pay + attr_reader :prepay_id + # A signature + attr_reader :sign + # Specifies the current time in epoch format + attr_reader :timestamp end class WechatPayRedirectToIosApp < Stripe::StripeObject + # An universal link that redirect to WeChat Pay app attr_reader :native_url end - attr_reader :alipay_handle_redirect, :boleto_display_details, :card_await_notification, :cashapp_handle_redirect_or_display_qr_code, :display_bank_transfer_instructions, :konbini_display_details, :multibanco_display_details, :oxxo_display_details, :paynow_display_qr_code, :pix_display_qr_code, :promptpay_display_qr_code, :redirect_to_url, :swish_handle_redirect_or_display_qr_code, :type, :use_stripe_sdk, :verify_with_microdeposits, :wechat_pay_display_qr_code, :wechat_pay_redirect_to_android_app, :wechat_pay_redirect_to_ios_app + # Attribute for field alipay_handle_redirect + attr_reader :alipay_handle_redirect + # Attribute for field boleto_display_details + attr_reader :boleto_display_details + # Attribute for field card_await_notification + attr_reader :card_await_notification + # Attribute for field cashapp_handle_redirect_or_display_qr_code + attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field display_bank_transfer_instructions + attr_reader :display_bank_transfer_instructions + # Attribute for field konbini_display_details + attr_reader :konbini_display_details + # Attribute for field multibanco_display_details + attr_reader :multibanco_display_details + # Attribute for field oxxo_display_details + attr_reader :oxxo_display_details + # Attribute for field paynow_display_qr_code + attr_reader :paynow_display_qr_code + # Attribute for field pix_display_qr_code + attr_reader :pix_display_qr_code + # Attribute for field promptpay_display_qr_code + attr_reader :promptpay_display_qr_code + # Attribute for field redirect_to_url + attr_reader :redirect_to_url + # Attribute for field swish_handle_redirect_or_display_qr_code + attr_reader :swish_handle_redirect_or_display_qr_code + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + attr_reader :type + # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits + attr_reader :verify_with_microdeposits + # Attribute for field wechat_pay_display_qr_code + attr_reader :wechat_pay_display_qr_code + # Attribute for field wechat_pay_redirect_to_android_app + attr_reader :wechat_pay_redirect_to_android_app + # Attribute for field wechat_pay_redirect_to_ios_app + attr_reader :wechat_pay_redirect_to_ios_app end class PaymentDetails < Stripe::StripeObject class CarRental < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - attr_reader :email, :name, :phone + # The email of the recipient the ticket is delivered to. + attr_reader :email + # The name of the recipient the ticket is delivered to. + attr_reader :name + # The phone number of the recipient the ticket is delivered to. + attr_reader :phone end - attr_reader :mode, :recipient + # The delivery method for the payment + attr_reader :mode + # Attribute for field recipient + attr_reader :recipient end class Driver < Stripe::StripeObject + # Full name of the driver on the reservation. attr_reader :name end class PickupAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ReturnAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :affiliate, :booking_number, :car_class_code, :car_make, :car_model, :company, :customer_service_phone_number, :days_rented, :delivery, :drivers, :extra_charges, :no_show, :pickup_address, :pickup_at, :rate_amount, :rate_interval, :renter_name, :return_address, :return_at, :tax_exempt + # Attribute for field affiliate + attr_reader :affiliate + # The booking number associated with the car rental. + attr_reader :booking_number + # Class code of the car. + attr_reader :car_class_code + # Make of the car. + attr_reader :car_make + # Model of the car. + attr_reader :car_model + # The name of the rental car company. + attr_reader :company + # The customer service phone number of the car rental company. + attr_reader :customer_service_phone_number + # Number of days the car is being rented. + attr_reader :days_rented + # Attribute for field delivery + attr_reader :delivery + # The details of the drivers associated with the trip. + attr_reader :drivers + # List of additional charges being billed. + attr_reader :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_reader :no_show + # Attribute for field pickup_address + attr_reader :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_reader :pickup_at + # Rental rate. + attr_reader :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_reader :rate_interval + # The full name of the person or entity renting the car. + attr_reader :renter_name + # Attribute for field return_address + attr_reader :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_reader :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_reader :tax_exempt end class EventDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - attr_reader :email, :name, :phone + # The email of the recipient the ticket is delivered to. + attr_reader :email + # The name of the recipient the ticket is delivered to. + attr_reader :name + # The phone number of the recipient the ticket is delivered to. + attr_reader :phone end - attr_reader :mode, :recipient + # The delivery method for the payment + attr_reader :mode + # Attribute for field recipient + attr_reader :recipient end - attr_reader :access_controlled_venue, :address, :affiliate, :company, :delivery, :ends_at, :genre, :name, :starts_at + # Indicates if the tickets are digitally checked when entering the venue. + attr_reader :access_controlled_venue + # Attribute for field address + attr_reader :address + # Attribute for field affiliate + attr_reader :affiliate + # The name of the company + attr_reader :company + # Attribute for field delivery + attr_reader :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_reader :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_reader :genre + # The name of the event. + attr_reader :name + # Event start time. Measured in seconds since the Unix epoch. + attr_reader :starts_at end class Subscription < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. attr_reader :name end class BillingInterval < Stripe::StripeObject - attr_reader :count, :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval end - attr_reader :affiliate, :auto_renewal, :billing_interval, :ends_at, :name, :starts_at - end - attr_reader :car_rental, :event_details, :subscription + # Attribute for field affiliate + attr_reader :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_reader :auto_renewal + # Attribute for field billing_interval + attr_reader :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_reader :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription. + attr_reader :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_reader :starts_at + end + # Attribute for field car_rental + attr_reader :car_rental + # Attribute for field event_details + attr_reader :event_details + # Attribute for field subscription + attr_reader :subscription end class PaymentMethodConfigurationDetails < Stripe::StripeObject - attr_reader :id, :parent + # ID of the payment method configuration used. + attr_reader :id + # ID of the parent payment method configuration used. + attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :mandate_options, :setup_future_usage, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class Affirm < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject - attr_reader :capture_method, :reference, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Alma < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class AmazonPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Blik < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject class AvailablePlan < Stripe::StripeObject - attr_reader :count, :interval, :type + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_reader :interval + # Type of installment plan, one of `fixed_count`. + attr_reader :type end class Plan < Stripe::StripeObject - attr_reader :count, :interval, :type + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_reader :interval + # Type of installment plan, one of `fixed_count`. + attr_reader :type end - attr_reader :available_plans, :enabled, :plan + # Installment plans that may be selected for this PaymentIntent. + attr_reader :available_plans + # Whether Installments are enabled for this PaymentIntent. + attr_reader :enabled + # Installment plan selected for this PaymentIntent. + attr_reader :plan end class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types + # Amount to be charged for future payments. + attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_reader :interval_count + # Unique identifier for the mandate or subscription. + attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_reader :supported_types end class StatementDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :phone + # Attribute for field address + attr_reader :address + # Phone number + attr_reader :phone end - attr_reader :capture_method, :installments, :mandate_options, :network, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_three_d_secure, :require_cvc_recollection, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji, :statement_details + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_reader :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_reader :mandate_options + # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + attr_reader :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_reader :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_reader :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_reader :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_reader :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_reader :statement_descriptor_suffix_kanji + # Attribute for field statement_details + attr_reader :statement_details end class CardPresent < Stripe::StripeObject class Routing < Stripe::StripeObject + # Requested routing priority attr_reader :requested_priority end - attr_reader :request_extended_authorization, :request_incremental_authorization_support, :routing + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_reader :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_reader :request_incremental_authorization_support + # Attribute for field routing + attr_reader :routing end class Cashapp < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :requested_address_types, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type, :setup_future_usage + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Gopay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class IdBankTransfer < Stripe::StripeObject - attr_reader :expires_after, :expires_at, :setup_future_usage + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. + attr_reader :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class InteracPresent < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. + attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - attr_reader :confirmation_number, :expires_after_days, :expires_at, :product_description, :setup_future_usage + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. + attr_reader :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + attr_reader :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_reader :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_reader :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Link < Stripe::StripeObject - attr_reader :capture_method, :persistent_token, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class MbWay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Oxxo < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :behavior + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :amount + # The tax behavior for the line item. + attr_reader :behavior end - attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount + # Type of the line item. + attr_reader :category + # Description of the line item. + attr_reader :description + # Descriptive name of the line item. + attr_reader :name + # Quantity of the line item. Cannot be a negative number. + attr_reader :quantity + # Client facing stock keeping unit, article number or similar. + attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + attr_reader :sold_by + # Attribute for field tax + attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :unit_amount end - attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # The line items purchased by the customer. + attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. + attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Pix < Stripe::StripeObject - attr_reader :expires_after_seconds, :expires_at, :setup_future_usage + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. + attr_reader :expires_after_seconds + # The timestamp at which the Pix expires. + attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Promptpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Qris < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Shopeepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the SOFORT authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Swish < Stripe::StripeObject - attr_reader :reference, :setup_future_usage + # The order ID displayed in the Swish app after the payment is authorized. + attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Twint < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. attr_reader :mode end - attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + # Attribute for field filters + attr_reader :filters + # Attribute for field manual_entry + attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method attr_reader :collection_method end - attr_reader :financial_connections, :mandate_options, :preferred_settlement_speed, :setup_future_usage, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Attribute for field mandate_options + attr_reader :mandate_options + # Preferred transaction settlement speed + attr_reader :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class WechatPay < Stripe::StripeObject - attr_reader :app_id, :client, :setup_future_usage + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_reader :app_id + # The client type that the end customer will pay from + attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Zip < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end - attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :us_bank_account, :wechat_pay, :zip + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mb_way + attr_reader :mb_way + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class Processing < Stripe::StripeObject class Card < Stripe::StripeObject class CustomerNotification < Stripe::StripeObject - attr_reader :approval_requested, :completes_at + # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. + attr_reader :approval_requested + # If customer approval is required, they need to provide approval before this time. + attr_reader :completes_at end + # Attribute for field customer_notification attr_reader :customer_notification end - attr_reader :card, :type + # Attribute for field card + attr_reader :card + # Type of the payment method for which payment is in `processing` state, one of `card`. + attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state - end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # The account (if any) that the payment is attributed to for tax + # reporting, and where funds from the payment are transferred to after + # payment success. + attr_reader :destination end # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount + # Amount that can be captured from this PaymentIntent. attr_reader :amount_capturable + # Attribute for field amount_details attr_reader :amount_details + # Amount that this PaymentIntent collects. attr_reader :amount_received + # ID of the Connect application that created the PaymentIntent. attr_reader :application + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_reader :application_fee_amount + # Attribute for field async_workflows attr_reader :async_workflows + # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) attr_reader :automatic_payment_methods + # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at + # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). attr_reader :cancellation_reason + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method + # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. attr_reader :client_secret + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. attr_reader :confirmation_method + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. # # Payment methods attached to other Customers cannot be used with this PaymentIntent. # # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Unique identifier for the object. attr_reader :id + # ID of the invoice that created this PaymentIntent, if it exists. attr_reader :invoice + # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. attr_reader :last_payment_error + # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. attr_reader :latest_charge + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). attr_reader :metadata + # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. attr_reader :next_action + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. attr_reader :on_behalf_of + # Attribute for field payment_details attr_reader :payment_details + # ID of the payment method used in this PaymentIntent. attr_reader :payment_method + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. attr_reader :payment_method_configuration_details + # Payment-method-specific configuration for this PaymentIntent. attr_reader :payment_method_options + # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. attr_reader :payment_method_types + # If present, this property tells you about the processing state of the payment. attr_reader :processing + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). attr_reader :receipt_email + # ID of the review associated with this PaymentIntent, if any. attr_reader :review + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. attr_reader :secret_key_confirmation + # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -617,20 +1831,27 @@ class TransferData < Stripe::StripeObject # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage + # Shipping information for this PaymentIntent. attr_reader :shipping + # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. attr_reader :source + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. attr_reader :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. attr_reader :statement_descriptor_suffix + # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). attr_reader :status + # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_reader :transfer_data + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). attr_reader :transfer_group diff --git a/lib/stripe/resources/payment_link.rb b/lib/stripe/resources/payment_link.rb index b01ba8e39..b4f8bc2bf 100644 --- a/lib/stripe/resources/payment_link.rb +++ b/lib/stripe/resources/payment_link.rb @@ -19,199 +19,355 @@ def self.object_name class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # The custom message that is displayed to the customer after the purchase is complete. attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the purchase is complete. attr_reader :url end - attr_reader :hosted_confirmation, :redirect, :type + # Attribute for field hosted_confirmation + attr_reader :hosted_confirmation + # Attribute for field redirect + attr_reader :redirect + # The specified behavior after the purchase is complete. + attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # If `true`, tax will be calculated automatically using the customer's location. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. attr_reader :position end - attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service + # Settings related to the payment method reuse text shown in the Checkout UI. + attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. + attr_reader :promotions + # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + attr_reader :terms_of_service end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - attr_reader :label, :value + # The label for the option, displayed to the customer. Up to 100 characters. + attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_reader :value end + # The options available for the customer to select. Up to 200 options allowed. attr_reader :options end class Label < Stripe::StripeObject - attr_reader :custom, :type + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_reader :custom + # The type of the label. + attr_reader :type end class Numeric < Stripe::StripeObject - attr_reader :maximum_length, :minimum_length + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length end class Text < Stripe::StripeObject - attr_reader :maximum_length, :minimum_length + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length end - attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type + # Attribute for field dropdown + attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_reader :key + # Attribute for field label + attr_reader :label + # Attribute for field numeric + attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_reader :optional + # Attribute for field text + attr_reader :text + # The type of the field. + attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end - attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance + # Custom text that should be displayed after the payment confirmation button. + attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_reader :terms_of_service_acceptance end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. attr_reader :amount_tax_display end - attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options + # The account tax IDs associated with the invoice. + attr_reader :account_tax_ids + # A list of up to 4 custom fields to be displayed on the invoice. + attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Footer to be displayed on the invoice. + attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Options for invoice PDF rendering. + attr_reader :rendering_options end - attr_reader :enabled, :invoice_data + # Enable creating an invoice on successful payment. + attr_reader :enabled + # Configuration for the invoice. Default invoice values will be used if unspecified. + attr_reader :invoice_data end class PaymentIntentData < Stripe::StripeObject - attr_reader :capture_method, :description, :metadata, :setup_future_usage, :statement_descriptor, :statement_descriptor_suffix, :transfer_group + # Indicates when the funds will be captured from the customer's account. + attr_reader :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + attr_reader :metadata + # Indicates that you intend to make future payments with the payment method collected during checkout. + attr_reader :setup_future_usage + # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. + attr_reader :statement_descriptor + # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. + attr_reader :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_reader :transfer_group end class PhoneNumberCollection < Stripe::StripeObject + # If `true`, a phone number will be collected during checkout. attr_reader :enabled end class Restrictions < Stripe::StripeObject class CompletedSessions < Stripe::StripeObject - attr_reader :count, :limit + # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. + attr_reader :count + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + attr_reader :limit end + # Attribute for field completed_sessions attr_reader :completed_sessions end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. attr_reader :allowed_countries end class ShippingOption < Stripe::StripeObject - attr_reader :shipping_amount, :shipping_rate + # A non-negative integer in cents representing how much to charge. + attr_reader :shipping_amount + # The ID of the Shipping Rate to use for this shipping option. + attr_reader :shipping_rate end class SubscriptionData < Stripe::StripeObject class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end + # Attribute for field issuer attr_reader :issuer end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. attr_reader :end_behavior end - attr_reader :description, :invoice_settings, :metadata, :trial_period_days, :trial_settings + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Attribute for field invoice_settings + attr_reader :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. + attr_reader :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_reader :trial_period_days + # Settings related to subscription trials. + attr_reader :trial_settings end class TaxIdCollection < Stripe::StripeObject - attr_reader :enabled, :required + # Indicates whether tax ID collection is enabled for the session. + attr_reader :enabled + # Attribute for field required + attr_reader :required end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount + # The connected account receiving the transfer. + attr_reader :destination end # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. attr_reader :active + # Attribute for field after_completion attr_reader :after_completion + # Whether user redeemable promotion codes are enabled. attr_reader :allow_promotion_codes + # The ID of the Connect application that created the Payment Link. attr_reader :application + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. attr_reader :application_fee_amount + # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. attr_reader :application_fee_percent + # Attribute for field automatic_tax attr_reader :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. attr_reader :billing_address_collection + # When set, provides configuration to gather active consent from customers. attr_reader :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. attr_reader :custom_fields + # Attribute for field custom_text attr_reader :custom_text + # Configuration for Customer creation during checkout. attr_reader :customer_creation + # Unique identifier for the object. attr_reader :id + # The custom message to be displayed to a customer when a payment link is no longer active. attr_reader :inactive_message + # Configuration for creating invoice for payment mode payment links. attr_reader :invoice_creation + # The line items representing what is being sold. attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. attr_reader :on_behalf_of + # Indicates the parameters to be passed to PaymentIntent creation during checkout. attr_reader :payment_intent_data + # Configuration for collecting a payment method during checkout. Defaults to `always`. attr_reader :payment_method_collection + # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). attr_reader :payment_method_types + # Attribute for field phone_number_collection attr_reader :phone_number_collection + # Settings that restrict the usage of a payment link. attr_reader :restrictions + # Configuration for collecting the customer's shipping address. attr_reader :shipping_address_collection + # The shipping rate options applied to the session. attr_reader :shipping_options + # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. attr_reader :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. attr_reader :subscription_data + # Attribute for field tax_id_collection attr_reader :tax_id_collection + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. attr_reader :transfer_data + # The public URL that can be shared with customers. attr_reader :url diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb index 0cf025150..5481f6d24 100644 --- a/lib/stripe/resources/payment_method.rb +++ b/lib/stripe/resources/payment_method.rb @@ -18,7 +18,16 @@ def self.object_name end class AcssDebit < Stripe::StripeObject - attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Institution number of the bank account. + attr_reader :institution_number + # Last four digits of the bank account number. + attr_reader :last4 + # Transit number of the bank account. + attr_reader :transit_number end class Affirm < Stripe::StripeObject; end @@ -28,59 +37,177 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4 + # Six-digit number identifying bank and branch associated with this bank account. + attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 end class BacsDebit < Stripe::StripeObject - attr_reader :fingerprint, :last4, :sort_code + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) + attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address. + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name + # Billing phone number (including extension). + attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class GeneratedFrom < Stripe::StripeObject class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + # The authorized amount + attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Details about payments collected offline. + attr_reader :offline + # Defines whether the authorized amount can be over-captured or not + attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt + # Attribute for field wallet + attr_reader :wallet end - attr_reader :card_present, :type + # Attribute for field card_present + attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + attr_reader :type end - attr_reader :charge, :payment_method_details, :setup_attempt + # The charge that created this object. + attr_reader :charge + # Transaction-specific details of the payment method used in the payment. + attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. attr_reader :supported end @@ -92,59 +219,216 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end - attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + # Attribute for field amex_express_checkout + attr_reader :amex_express_checkout + # Attribute for field apple_pay + attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field link + attr_reader :link + # Attribute for field masterpass + attr_reader :masterpass + # Attribute for field samsung_pay + attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type + # Attribute for field visa_checkout + attr_reader :visa_checkout end - attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :three_d_secure_usage, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Checks on Card address and CVC if provided. + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + attr_reader :display_brand + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Details of the original PaymentMethod that created this object. + attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Contains details on how this Card may be used for 3D Secure authentication. + attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Details about payment methods collected offline. + attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # Attribute for field wallet + attr_reader :wallet end class Cashapp < Stripe::StripeObject - attr_reader :buyer_id, :cashtag + # A unique and immutable identifier assigned by Cash App to every buyer. + attr_reader :buyer_id + # A public identifier for buyers using Cash App. + attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. attr_reader :bank end class Fpx < Stripe::StripeObject - attr_reader :account_holder_type, :bank + # Account holder type, if provided. Can be one of `individual` or `company`. + attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + attr_reader :bank end class Giropay < Stripe::StripeObject; end @@ -152,37 +436,91 @@ class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :bank, :bank_code, :bank_name, :display_name + # Attribute for field bank + attr_reader :bank + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field display_name + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. + attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end - attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method + # Card brand. Can be `interac`, `mastercard` or `visa`. + attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # The customer's date of birth, if provided. attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - attr_reader :brand, :last4 + # The local credit or debit card brand. + attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. + attr_reader :last4 end class Link < Stripe::StripeObject - attr_reader :email, :persistent_token + # Account owner's email address. + attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token end class MbWay < Stripe::StripeObject; end @@ -190,12 +528,14 @@ class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. attr_reader :bank end @@ -203,11 +543,25 @@ class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - attr_reader :fingerprint, :payer_email, :payer_id, :verified_email + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email end class Payto < Stripe::StripeObject - attr_reader :bsb_number, :last4, :pay_id + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Last four digits of the bank account number. + attr_reader :last4 + # The PayID alias for the bank account. + attr_reader :pay_id end class Pix < Stripe::StripeObject; end @@ -215,13 +569,20 @@ class Promptpay < Stripe::StripeObject; end class Qris < Stripe::StripeObject; end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. attr_reader :session end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # Attribute for field dob attr_reader :dob end @@ -230,14 +591,29 @@ class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - attr_reader :charge, :setup_attempt + # The ID of the Charge that generated this PaymentMethod, if any. + attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end - attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Branch code of bank associated with the bank account. + attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. + attr_reader :generated_from + # Last four characters of the IBAN. + attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. attr_reader :country end @@ -246,142 +622,229 @@ class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :preferred, :supported + # The preferred network. + attr_reader :preferred + # All supported networks. + attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - attr_reader :network_code, :reason + # The ACH network code that resulted in this block. + attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked + attr_reader :reason end + # Attribute for field blocked attr_reader :blocked end - attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account number of the bank account. + attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # The name of the bank. + attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. + attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Contains information about US bank account networks that can be used. + attr_reader :networks + # Routing number of the bank account. + attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. + attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end # Attribute for field acss_debit attr_reader :acss_debit + # Attribute for field affirm attr_reader :affirm + # Attribute for field afterpay_clearpay attr_reader :afterpay_clearpay + # Attribute for field alipay attr_reader :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. attr_reader :allow_redisplay + # Attribute for field alma attr_reader :alma + # Attribute for field amazon_pay attr_reader :amazon_pay + # Attribute for field au_becs_debit attr_reader :au_becs_debit + # Attribute for field bacs_debit attr_reader :bacs_debit + # Attribute for field bancontact attr_reader :bancontact + # Attribute for field billing_details attr_reader :billing_details + # Attribute for field blik attr_reader :blik + # Attribute for field boleto attr_reader :boleto + # Attribute for field card attr_reader :card + # Attribute for field card_present attr_reader :card_present + # Attribute for field cashapp attr_reader :cashapp + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. attr_reader :customer + # Attribute for field customer_balance attr_reader :customer_balance + # Attribute for field eps attr_reader :eps + # Attribute for field fpx attr_reader :fpx + # Attribute for field giropay attr_reader :giropay + # Attribute for field gopay attr_reader :gopay + # Attribute for field grabpay attr_reader :grabpay + # Unique identifier for the object. attr_reader :id + # Attribute for field id_bank_transfer attr_reader :id_bank_transfer + # Attribute for field ideal attr_reader :ideal + # Attribute for field interac_present attr_reader :interac_present + # Attribute for field kakao_pay attr_reader :kakao_pay + # Attribute for field klarna attr_reader :klarna + # Attribute for field konbini attr_reader :konbini + # Attribute for field kr_card attr_reader :kr_card + # Attribute for field link attr_reader :link + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Attribute for field mb_way attr_reader :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Attribute for field mobilepay attr_reader :mobilepay + # Attribute for field multibanco attr_reader :multibanco + # Attribute for field naver_pay attr_reader :naver_pay + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field oxxo attr_reader :oxxo + # Attribute for field p24 attr_reader :p24 + # Attribute for field payco attr_reader :payco + # Attribute for field paynow attr_reader :paynow + # Attribute for field paypal attr_reader :paypal + # Attribute for field payto attr_reader :payto + # Attribute for field pix attr_reader :pix + # Attribute for field promptpay attr_reader :promptpay + # Attribute for field qris attr_reader :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. attr_reader :radar_options + # Attribute for field rechnung attr_reader :rechnung + # Attribute for field revolut_pay attr_reader :revolut_pay + # Attribute for field samsung_pay attr_reader :samsung_pay + # Attribute for field sepa_debit attr_reader :sepa_debit + # Attribute for field shopeepay attr_reader :shopeepay + # Attribute for field sofort attr_reader :sofort + # Attribute for field swish attr_reader :swish + # Attribute for field twint attr_reader :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. attr_reader :type + # Attribute for field us_bank_account attr_reader :us_bank_account + # Attribute for field wechat_pay attr_reader :wechat_pay + # Attribute for field zip attr_reader :zip diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index fece78419..182861f7c 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -28,431 +28,852 @@ def self.object_name class AcssDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Affirm < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class AfterpayClearpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Alipay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Alma < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class AmazonPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class ApplePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class AuBecsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class BacsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Bancontact < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Blik < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Boleto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Card < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class CartesBancaires < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Cashapp < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class CustomerBalance < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Eps < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Fpx < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Giropay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class GooglePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Gopay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Grabpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class IdBankTransfer < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Ideal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Jcb < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Klarna < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Konbini < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Link < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Mobilepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Multibanco < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Oxxo < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class P24 < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Paynow < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Paypal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Payto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Promptpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Qris < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class RevolutPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class SepaDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Shopeepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Sofort < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Swish < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Twint < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class UsBankAccount < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class WechatPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Zip < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end # Attribute for field acss_debit attr_reader :acss_debit + # Whether the configuration can be used for new payments. attr_reader :active + # Attribute for field affirm attr_reader :affirm + # Attribute for field afterpay_clearpay attr_reader :afterpay_clearpay + # Attribute for field alipay attr_reader :alipay + # Attribute for field alma attr_reader :alma + # Attribute for field amazon_pay attr_reader :amazon_pay + # Attribute for field apple_pay attr_reader :apple_pay + # For child configs, the Connect application associated with the configuration. attr_reader :application + # Attribute for field au_becs_debit attr_reader :au_becs_debit + # Attribute for field bacs_debit attr_reader :bacs_debit + # Attribute for field bancontact attr_reader :bancontact + # Attribute for field blik attr_reader :blik + # Attribute for field boleto attr_reader :boleto + # Attribute for field card attr_reader :card + # Attribute for field cartes_bancaires attr_reader :cartes_bancaires + # Attribute for field cashapp attr_reader :cashapp + # Attribute for field customer_balance attr_reader :customer_balance + # Attribute for field eps attr_reader :eps + # Attribute for field fpx attr_reader :fpx + # Attribute for field giropay attr_reader :giropay + # Attribute for field google_pay attr_reader :google_pay + # Attribute for field gopay attr_reader :gopay + # Attribute for field grabpay attr_reader :grabpay + # Unique identifier for the object. attr_reader :id + # Attribute for field id_bank_transfer attr_reader :id_bank_transfer + # Attribute for field ideal attr_reader :ideal + # The default configuration is used whenever a payment method configuration is not specified. attr_reader :is_default + # Attribute for field jcb attr_reader :jcb + # Attribute for field klarna attr_reader :klarna + # Attribute for field konbini attr_reader :konbini + # Attribute for field link attr_reader :link + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Attribute for field mobilepay attr_reader :mobilepay + # Attribute for field multibanco attr_reader :multibanco + # The configuration's name. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field oxxo attr_reader :oxxo + # Attribute for field p24 attr_reader :p24 + # For child configs, the configuration's parent configuration. attr_reader :parent + # Attribute for field paynow attr_reader :paynow + # Attribute for field paypal attr_reader :paypal + # Attribute for field payto attr_reader :payto + # Attribute for field promptpay attr_reader :promptpay + # Attribute for field qris attr_reader :qris + # Attribute for field revolut_pay attr_reader :revolut_pay + # Attribute for field sepa_debit attr_reader :sepa_debit + # Attribute for field shopeepay attr_reader :shopeepay + # Attribute for field sofort attr_reader :sofort + # Attribute for field swish attr_reader :swish + # Attribute for field twint attr_reader :twint + # Attribute for field us_bank_account attr_reader :us_bank_account + # Attribute for field wechat_pay attr_reader :wechat_pay + # Attribute for field zip attr_reader :zip diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb index 5e16e18fd..a1fdafdcd 100644 --- a/lib/stripe/resources/payment_method_domain.rb +++ b/lib/stripe/resources/payment_method_domain.rb @@ -18,58 +18,88 @@ def self.object_name class AmazonPay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class ApplePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class GooglePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class Link < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class Paypal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end # Indicates the status of a specific payment method on a payment method domain. attr_reader :amazon_pay + # Indicates the status of a specific payment method on a payment method domain. attr_reader :apple_pay + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The domain name that this payment method domain object represents. attr_reader :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. attr_reader :enabled + # Indicates the status of a specific payment method on a payment method domain. attr_reader :google_pay + # Unique identifier for the object. attr_reader :id + # Indicates the status of a specific payment method on a payment method domain. attr_reader :link + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Indicates the status of a specific payment method on a payment method domain. attr_reader :paypal diff --git a/lib/stripe/resources/payment_record.rb b/lib/stripe/resources/payment_record.rb index d06e56715..b1914f020 100644 --- a/lib/stripe/resources/payment_record.rb +++ b/lib/stripe/resources/payment_record.rb @@ -13,81 +13,163 @@ def self.object_name end class AmountCanceled < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountFailed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountGuaranteed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountRefunded < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountRequested < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class CustomerDetails < Stripe::StripeObject - attr_reader :customer, :email, :name, :phone + # ID of the Stripe Customer associated with this payment. + attr_reader :customer + # The customer's email address. + attr_reader :email + # The customer's name. + attr_reader :name + # The customer's phone number. + attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # A representation of a physical address. + attr_reader :address + # The billing email associated with the method of payment. + attr_reader :email + # The billing name associated with the method of payment. + attr_reader :name + # The billing phone number associated with the method of payment. + attr_reader :phone end class Custom < Stripe::StripeObject - attr_reader :display_name, :type + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_reader :display_name + # The custom payment method type associated with this payment. + attr_reader :type end - attr_reader :billing_details, :custom, :payment_method, :type + # The billing details associated with the method of payment. + attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. + attr_reader :payment_method + # The type of Payment Method used for this payment attempt. + attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :name, :phone + # A representation of a physical address. + attr_reader :address + # The shipping recipient's name. + attr_reader :name + # The shipping recipient's phone number. + attr_reader :phone end # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_canceled + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_failed + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_guaranteed + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_refunded + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Customer information for this payment. attr_reader :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. attr_reader :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Unique identifier for the object. attr_reader :id + # ID of the latest Payment Attempt Record attached to this Payment Record. attr_reader :latest_payment_attempt_record + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Information about the Payment Method debited for this payment. attr_reader :payment_method_details + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. attr_reader :payment_reference + # Shipping information for this payment. attr_reader :shipping_details diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb index dc6220842..e2d007153 100644 --- a/lib/stripe/resources/payout.rb +++ b/lib/stripe/resources/payout.rb @@ -21,58 +21,86 @@ def self.object_name end class TraceId < Stripe::StripeObject - attr_reader :status, :value + # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + attr_reader :status + # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + attr_reader :value end # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. attr_reader :amount + # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. attr_reader :application_fee + # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. attr_reader :application_fee_amount + # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. attr_reader :arrival_date + # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). attr_reader :automatic + # ID of the balance transaction that describes the impact of this payout on your account balance. attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # ID of the bank account or card the payout is sent to. attr_reader :destination + # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. attr_reader :failure_balance_transaction + # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). attr_reader :failure_code + # Message that provides the reason for a payout failure, if available. attr_reader :failure_message + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). attr_reader :method + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # If the payout reverses another, this is the ID of the original payout. attr_reader :original_payout + # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. attr_reader :reconciliation_status + # If the payout reverses, this is the ID of the payout that reverses this payout. attr_reader :reversed_by + # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. attr_reader :source_type + # Extra information about a payout that displays on the user's bank statement. attr_reader :statement_descriptor + # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. attr_reader :status + # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. attr_reader :trace_id + # Can be `bank_account` or `card`. attr_reader :type diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb index b4d84fddc..923d406df 100644 --- a/lib/stripe/resources/person.rb +++ b/lib/stripe/resources/person.rb @@ -17,129 +17,295 @@ def self.object_name class AdditionalTosAcceptances < Stripe::StripeObject class Account < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the legal guardian accepted the service agreement. + attr_reader :date + # The IP address from which the legal guardian accepted the service agreement. + attr_reader :ip + # The user agent of the browser from which the legal guardian accepted the service agreement. + attr_reader :user_agent end + # Details on the legal guardian's acceptance of the main Stripe service agreement. attr_reader :account end class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class AddressKana < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class AddressKanji < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class RegisteredAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Relationship < Stripe::StripeObject - attr_reader :authorizer, :director, :executive, :legal_guardian, :owner, :percent_ownership, :representative, :title + # Whether the person is the authorizer of the account's representative. + attr_reader :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_reader :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_reader :executive + # Whether the person is the legal guardian of the account's representative. + attr_reader :legal_guardian + # Whether the person is an owner of the account’s legal entity. + attr_reader :owner + # The percent owned by the person of the account's legal entity. + attr_reader :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + attr_reader :representative + # The person's title (e.g., CEO, Support Engineer). + attr_reader :title end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Verification < Stripe::StripeObject class AdditionalDocument < Stripe::StripeObject - attr_reader :back, :details, :details_code, :front + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :front end class Document < Stripe::StripeObject - attr_reader :back, :details, :details_code, :front + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :front end - attr_reader :additional_document, :details, :details_code, :document, :status + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_reader :additional_document + # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". + attr_reader :details + # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. + attr_reader :details_code + # Attribute for field document + attr_reader :document + # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. + attr_reader :status end # The account the person is associated with. attr_reader :account + # Attribute for field additional_tos_acceptances attr_reader :additional_tos_acceptances + # Attribute for field address attr_reader :address + # The Kana variation of the person's address (Japan only). attr_reader :address_kana + # The Kanji variation of the person's address (Japan only). attr_reader :address_kanji + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Attribute for field dob attr_reader :dob + # The person's email address. attr_reader :email + # The person's first name. attr_reader :first_name + # The Kana variation of the person's first name (Japan only). attr_reader :first_name_kana + # The Kanji variation of the person's first name (Japan only). attr_reader :first_name_kanji + # A list of alternate names or aliases that the person is known by. attr_reader :full_name_aliases + # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. attr_reader :future_requirements + # The person's gender. attr_reader :gender + # Unique identifier for the object. attr_reader :id + # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). attr_reader :id_number_provided + # Whether the person's `id_number_secondary` was provided. attr_reader :id_number_secondary_provided + # The person's last name. attr_reader :last_name + # The Kana variation of the person's last name (Japan only). attr_reader :last_name_kana + # The Kanji variation of the person's last name (Japan only). attr_reader :last_name_kanji + # The person's maiden name. attr_reader :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The country where the person is a national. attr_reader :nationality + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The person's phone number. attr_reader :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. attr_reader :political_exposure + # Attribute for field registered_address attr_reader :registered_address + # Attribute for field relationship attr_reader :relationship + # Information about the requirements for this person, including what information needs to be collected, and by when. attr_reader :requirements + # Whether the last four digits of the person's Social Security number have been provided (U.S. only). attr_reader :ssn_last_4_provided + # Attribute for field verification attr_reader :verification + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb index c55fdceb1..cad4164e5 100644 --- a/lib/stripe/resources/plan.rb +++ b/lib/stripe/resources/plan.rb @@ -22,54 +22,87 @@ def self.object_name end class Tier < Stripe::StripeObject - attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + # Price for the entire tier. + attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. + attr_reader :up_to end class TransformUsage < Stripe::StripeObject - attr_reader :divide_by, :round + # Divide usage by this number. + attr_reader :divide_by + # After division, either round the result `up` or `down`. + attr_reader :round end # Whether the plan can be used for new purchases. attr_reader :active + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. attr_reader :aggregate_usage + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. attr_reader :amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. attr_reader :amount_decimal + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. attr_reader :billing_scheme + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Unique identifier for the object. attr_reader :id + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. attr_reader :interval_count + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The meter tracking the usage of a metered price attr_reader :meter + # A brief description of the plan, hidden from customers. attr_reader :nickname + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The product whose pricing this plan determines. attr_reader :product + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. attr_reader :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. attr_reader :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. attr_reader :transform_usage + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). attr_reader :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. attr_reader :usage_type + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb index 2a10a85bd..e3902cd78 100644 --- a/lib/stripe/resources/price.rb +++ b/lib/stripe/resources/price.rb @@ -21,78 +21,156 @@ def self.object_name class CurrencyOptions < Stripe::StripeObject class CustomUnitAmount < Stripe::StripeObject - attr_reader :maximum, :minimum, :preset + # The maximum unit amount the customer can specify for this item. + attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_reader :minimum + # The starting unit amount which can be updated by the customer. + attr_reader :preset end class Tier < Stripe::StripeObject - attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + # Price for the entire tier. + attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. + attr_reader :up_to end - attr_reader :custom_unit_amount, :tax_behavior, :tiers, :unit_amount, :unit_amount_decimal + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_reader :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_reader :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_reader :tiers + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount_decimal end class CustomUnitAmount < Stripe::StripeObject - attr_reader :maximum, :minimum, :preset + # The maximum unit amount the customer can specify for this item. + attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_reader :minimum + # The starting unit amount which can be updated by the customer. + attr_reader :preset end class MigrateTo < Stripe::StripeObject - attr_reader :behavior, :effective_after, :price + # The behavior controlling at what point in the subscription lifecycle to migrate the price + attr_reader :behavior + # The unix timestamp after at which subscriptions will start to migrate to the new price. + attr_reader :effective_after + # The id of the price being migrated to + attr_reader :price end class Recurring < Stripe::StripeObject - attr_reader :aggregate_usage, :interval, :interval_count, :meter, :trial_period_days, :usage_type + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. + attr_reader :aggregate_usage + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + attr_reader :interval_count + # The meter tracking the usage of a metered price + attr_reader :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_reader :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_reader :usage_type end class Tier < Stripe::StripeObject - attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + # Price for the entire tier. + attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. + attr_reader :up_to end class TransformQuantity < Stripe::StripeObject - attr_reader :divide_by, :round + # Divide usage by this number. + attr_reader :divide_by + # After division, either round the result `up` or `down`. + attr_reader :round end # Whether the price can be used for new purchases. attr_reader :active + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. attr_reader :billing_scheme + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_reader :custom_unit_amount + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. attr_reader :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Subscriptions using this price will be migrated to use the new referenced price. attr_reader :migrate_to + # A brief description of the price, hidden from customers. attr_reader :nickname + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ID of the product this price is associated with. attr_reader :product + # The recurring components of a price such as `interval` and `usage_type`. attr_reader :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. attr_reader :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. attr_reader :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. attr_reader :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. attr_reader :transform_quantity + # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. attr_reader :type + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. attr_reader :unit_amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. attr_reader :unit_amount_decimal + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb index 85379e215..ca12a7a2b 100644 --- a/lib/stripe/resources/product.rb +++ b/lib/stripe/resources/product.rb @@ -26,62 +26,99 @@ def self.object_name nested_resource_class_methods :feature, operations: %i[create retrieve delete list] class MarketingFeature < Stripe::StripeObject + # The marketing feature name. Up to 80 characters long. attr_reader :name end class PackageDimensions < Stripe::StripeObject - attr_reader :height, :length, :weight, :width + # Height, in inches. + attr_reader :height + # Length, in inches. + attr_reader :length + # Weight, in ounces. + attr_reader :weight + # Width, in inches. + attr_reader :width end class Provisioning < Stripe::StripeObject class GiftCard < Stripe::StripeObject class FixedAmount < Stripe::StripeObject - attr_reader :amount, :currency + # The initial amount with which the provisioned gift card will be created. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency end - attr_reader :fixed_amount, :type + # Attribute for field fixed_amount + attr_reader :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. + attr_reader :type end - attr_reader :gift_card, :type + # Attribute for field gift_card + attr_reader :gift_card + # The type of provisioning, only `gift_card` currently supported. + attr_reader :type end # Whether the product is currently available for purchase. attr_reader :active + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. attr_reader :default_price + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. attr_reader :description + # Unique identifier for the object. attr_reader :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. attr_reader :images + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). attr_reader :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The product's name, meant to be displayable to the customer. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The dimensions of this product for shipping purposes. attr_reader :package_dimensions + # Provisioning configuration for this product. attr_reader :provisioning + # Whether this product is shipped (i.e., physical goods). attr_reader :shippable + # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. attr_reader :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. attr_reader :tax_code + # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. attr_reader :type + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. attr_reader :unit_label + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated + # A URL of a publicly-accessible webpage for this product. attr_reader :url + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/product_feature.rb b/lib/stripe/resources/product_feature.rb index ebf0ba3e5..937633c6e 100644 --- a/lib/stripe/resources/product_feature.rb +++ b/lib/stripe/resources/product_feature.rb @@ -13,12 +13,16 @@ def self.object_name # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. attr_reader :entitlement_feature + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Always true for a deleted object attr_reader :deleted end diff --git a/lib/stripe/resources/promotion_code.rb b/lib/stripe/resources/promotion_code.rb index 1339b7eb5..aed9581ca 100644 --- a/lib/stripe/resources/promotion_code.rb +++ b/lib/stripe/resources/promotion_code.rb @@ -16,36 +16,56 @@ def self.object_name class Restrictions < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). attr_reader :minimum_amount end - attr_reader :currency_options, :first_time_transaction, :minimum_amount, :minimum_amount_currency + # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + attr_reader :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_reader :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + attr_reader :minimum_amount_currency end # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. attr_reader :active + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). attr_reader :code + # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). attr_reader :coupon + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The customer that this promotion code can be used by. attr_reader :customer + # Date at which the promotion code can no longer be redeemed. attr_reader :expires_at + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Maximum number of times this promotion code can be redeemed. attr_reader :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field restrictions attr_reader :restrictions + # Number of times this promotion code has been used. attr_reader :times_redeemed diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index a0844890d..2291233a8 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -20,253 +20,558 @@ def self.object_name class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability, :status + # Automatically calculate taxes + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this quote. + attr_reader :status end class Computed < Stripe::StripeObject class LastReestimationDetails < Stripe::StripeObject class Failed < Stripe::StripeObject - attr_reader :failure_code, :message, :reason + # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. + attr_reader :failure_code + # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". + attr_reader :message + # The reason the reestimation failed. + attr_reader :reason end - attr_reader :failed, :status + # When `status` is `failed`, provides details about the quote reestimation failure. + attr_reader :failed + # Latest status of the reestimation. + attr_reader :status end class Recurring < Stripe::StripeObject class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end - attr_reader :amount_subtotal, :amount_total, :interval, :interval_count, :total_details + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total after discounts and taxes are applied. + attr_reader :amount_total + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + attr_reader :interval_count + # Attribute for field total_details + attr_reader :total_details end class Upfront < Stripe::StripeObject class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end - attr_reader :amount_subtotal, :amount_total, :line_items, :total_details + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total after discounts and taxes are applied. + attr_reader :amount_total + # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + attr_reader :line_items + # Attribute for field total_details + attr_reader :total_details end - attr_reader :last_reestimation_details, :recurring, :updated_at, :upfront + # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. + attr_reader :last_reestimation_details + # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. + attr_reader :recurring + # The time at which the quote's estimated schedules and upcoming invoices were generated. + attr_reader :updated_at + # Attribute for field upfront + attr_reader :upfront end class FromQuote < Stripe::StripeObject - attr_reader :is_revision, :quote + # Whether this quote is a revision of a different quote. + attr_reader :is_revision + # The quote that was cloned. + attr_reader :quote end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :days_until_due, :issuer + # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + attr_reader :days_until_due + # Attribute for field issuer + attr_reader :issuer end class StatusDetails < Stripe::StripeObject class Canceled < Stripe::StripeObject - attr_reader :reason, :transitioned_at + # The reason this quote was marked as canceled. + attr_reader :reason + # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. + attr_reader :transitioned_at end class Stale < Stripe::StripeObject class LastReason < Stripe::StripeObject class LinesInvalid < Stripe::StripeObject - attr_reader :invalid_at, :lines + # The timestamp at which the lines were marked as invalid. + attr_reader :invalid_at + # The list of lines that became invalid at the given timestamp. + attr_reader :lines end class SubscriptionChanged < Stripe::StripeObject + # The subscription's state before the quote was marked as stale. attr_reader :previous_subscription end class SubscriptionScheduleChanged < Stripe::StripeObject + # The subscription schedule's state before the quote was marked as stale. attr_reader :previous_subscription_schedule end - attr_reader :line_invalid, :lines_invalid, :marked_stale, :subscription_canceled, :subscription_changed, :subscription_expired, :subscription_schedule_canceled, :subscription_schedule_changed, :subscription_schedule_released, :type + # The ID of the line that is invalid if the stale reason type is `line_invalid`. + attr_reader :line_invalid + # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. + attr_reader :lines_invalid + # The user supplied mark stale reason. + attr_reader :marked_stale + # The ID of the subscription that was canceled. + attr_reader :subscription_canceled + # Attribute for field subscription_changed + attr_reader :subscription_changed + # The ID of the subscription that was expired. + attr_reader :subscription_expired + # The ID of the subscription schedule that was canceled. + attr_reader :subscription_schedule_canceled + # Attribute for field subscription_schedule_changed + attr_reader :subscription_schedule_changed + # The ID of the subscription schedule that was released. + attr_reader :subscription_schedule_released + # The reason the quote was marked as stale. + attr_reader :type end - attr_reader :expires_at, :last_reason, :last_updated_at, :transitioned_at + # Time at which the quote expires. Measured in seconds since the Unix epoch. + attr_reader :expires_at + # The most recent reason this quote was marked as stale. + attr_reader :last_reason + # Time at which the stale reason was updated. Measured in seconds since the Unix epoch. + attr_reader :last_updated_at + # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. + attr_reader :transitioned_at end - attr_reader :canceled, :stale + # Attribute for field canceled + attr_reader :canceled + # Attribute for field stale + attr_reader :stale end class StatusTransitions < Stripe::StripeObject - attr_reader :accepted_at, :canceled_at, :finalized_at + # The time that the quote was accepted. Measured in seconds since Unix epoch. + attr_reader :accepted_at + # The time that the quote was canceled. Measured in seconds since Unix epoch. + attr_reader :canceled_at + # The time that the quote was finalized. Measured in seconds since Unix epoch. + attr_reader :finalized_at end class SubscriptionData < Stripe::StripeObject class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :line_starts_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # The timestamp the given line starts at. + attr_reader :line_starts_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_from` time. + attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :duration, :line_ends_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. + attr_reader :duration + # The timestamp the given line ends at. + attr_reader :line_ends_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_until` time. + attr_reader :type end - attr_reader :bill_from, :bill_until + # The start of the period to bill from when the Quote is accepted. + attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_reader :bill_until end class Prebilling < Stripe::StripeObject + # Attribute for field iterations attr_reader :iterations end - attr_reader :bill_on_acceptance, :billing_behavior, :billing_cycle_anchor, :description, :effective_date, :end_behavior, :from_subscription, :metadata, :prebilling, :proration_behavior, :trial_period_days + # Describes the period to bill for upon accepting the quote. + attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + # Whether the subscription will always start a new billing period when the quote is accepted. + attr_reader :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + attr_reader :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_reader :end_behavior + # The id of the subscription that will be updated when the quote is accepted. + attr_reader :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_reader :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + attr_reader :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. + attr_reader :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_reader :trial_period_days end class SubscriptionDataOverride < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :line_starts_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # The timestamp the given line starts at. + attr_reader :line_starts_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_from` time. + attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :duration, :line_ends_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. + attr_reader :duration + # The timestamp the given line ends at. + attr_reader :line_ends_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_until` time. + attr_reader :type end - attr_reader :bill_from, :bill_until + # The start of the period to bill from when the Quote is accepted. + attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_reader :bill_until end - attr_reader :applies_to, :bill_on_acceptance, :billing_behavior, :customer, :description, :end_behavior, :proration_behavior + # Attribute for field applies_to + attr_reader :applies_to + # Describes the period to bill for upon accepting the quote. + attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_reader :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_reader :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. + attr_reader :proration_behavior end class SubscriptionSchedule < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end - attr_reader :applies_to, :subscription_schedule + # Attribute for field applies_to + attr_reader :applies_to + # The subscription schedule that was created or updated from this quote. + attr_reader :subscription_schedule end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end class TransferData < Stripe::StripeObject - attr_reader :amount, :amount_percent, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + attr_reader :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. attr_reader :allow_backdated_lines + # Total before any discounts or taxes are applied. attr_reader :amount_subtotal + # Total after discounts and taxes are applied. attr_reader :amount_total + # ID of the Connect Application that created the quote. attr_reader :application + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. attr_reader :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. attr_reader :application_fee_percent + # Attribute for field automatic_tax attr_reader :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. attr_reader :collection_method + # Attribute for field computed attr_reader :computed + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. attr_reader :customer + # The tax rates applied to this quote. attr_reader :default_tax_rates + # A description that will be displayed on the quote PDF. attr_reader :description + # The discounts applied to this quote. attr_reader :discounts + # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. attr_reader :expires_at + # A footer that will be displayed on the quote PDF. attr_reader :footer + # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. attr_reader :from_quote + # A header that will be displayed on the quote PDF. attr_reader :header + # Unique identifier for the object. attr_reader :id + # The invoice that was created from this quote. attr_reader :invoice + # Attribute for field invoice_settings attr_reader :invoice_settings + # A list of items the customer is being quoted for. attr_reader :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). attr_reader :number + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. attr_reader :on_behalf_of + # The status of the quote. attr_reader :status + # Details on when and why a quote has been marked as stale or canceled. attr_reader :status_details + # Attribute for field status_transitions attr_reader :status_transitions + # The subscription that was created or updated from this quote. attr_reader :subscription + # Attribute for field subscription_data attr_reader :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. attr_reader :subscription_data_overrides + # The subscription schedule that was created or updated from this quote. attr_reader :subscription_schedule + # The subscription schedules that were created or updated from this quote. attr_reader :subscription_schedules + # ID of the test clock this quote belongs to. attr_reader :test_clock + # Attribute for field total_details attr_reader :total_details + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. attr_reader :transfer_data diff --git a/lib/stripe/resources/quote_line.rb b/lib/stripe/resources/quote_line.rb index 16cd4815c..9df1a44f4 100644 --- a/lib/stripe/resources/quote_line.rb +++ b/lib/stripe/resources/quote_line.rb @@ -12,124 +12,273 @@ def self.object_name class Action < Stripe::StripeObject class AddDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end type. attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :index, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_reader :index + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class AddItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end class RemoveDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class RemoveItem < Stripe::StripeObject + # ID of a price to remove. attr_reader :price end class SetDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class SetItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end - attr_reader :add_discount, :add_item, :add_metadata, :remove_discount, :remove_item, :remove_metadata, :set_discounts, :set_items, :set_metadata, :type + # Details for the `add_discount` type. + attr_reader :add_discount + # Details for the `add_item` type. + attr_reader :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + attr_reader :add_metadata + # Details for the `remove_discount` type. + attr_reader :remove_discount + # Details for the `remove_item` type. + attr_reader :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + attr_reader :remove_metadata + # Details for the `set_discounts` type. + attr_reader :set_discounts + # Details for the `set_items` type. + attr_reader :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + attr_reader :set_metadata + # The type of action the quote line performs. + attr_reader :type end class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class CancelSubscriptionSchedule < Stripe::StripeObject - attr_reader :cancel_at, :invoice_now, :prorate + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + attr_reader :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + attr_reader :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + attr_reader :prorate end class EndsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. attr_reader :discount end class Duration < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :interval_count end - attr_reader :computed, :discount_end, :duration, :timestamp, :type + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. + attr_reader :computed + # Use the `end` time of a given discount. + attr_reader :discount_end + # Time span for the quote line starting from the `starts_at` date. + attr_reader :duration + # A precise Unix timestamp. + attr_reader :timestamp + # Select a way to pass in `ends_at`. + attr_reader :type end class SetPauseCollection < Stripe::StripeObject class Set < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end - attr_reader :set, :type + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :set + # Defines the type of the pause_collection behavior for the quote line. + attr_reader :type end class StartsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. attr_reader :discount end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :discount_end, :line_ends_at, :timestamp, :type + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. + attr_reader :computed + # Use the `end` time of a given discount. + attr_reader :discount_end + # The timestamp the given line ends at. + attr_reader :line_ends_at + # A precise Unix timestamp. + attr_reader :timestamp + # Select a way to pass in `starts_at`. + attr_reader :type end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end # A list of items the customer is being quoted for. attr_reader :actions + # Details to identify the subscription schedule the quote line applies to. attr_reader :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. attr_reader :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. attr_reader :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. attr_reader :ends_at + # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. attr_reader :proration_behavior + # Details to modify the pause_collection behavior of the subscription schedule. attr_reader :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. attr_reader :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. attr_reader :starts_at + # Settings related to subscription trials. attr_reader :trial_settings end diff --git a/lib/stripe/resources/quote_preview_invoice.rb b/lib/stripe/resources/quote_preview_invoice.rb index 559d0b20f..3109eccbe 100644 --- a/lib/stripe/resources/quote_preview_invoice.rb +++ b/lib/stripe/resources/quote_preview_invoice.rb @@ -41,79 +41,225 @@ def self.object_name end class AmountsDue < Stripe::StripeObject - attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status + # Incremental amount due for this payment in cents (or local equivalent). + attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. + attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. + attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Date on which a payment plan’s payment is due. + attr_reader :due_date + # Timestamp when the payment was paid. + attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` + attr_reader :status end class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability, :status + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. + attr_reader :status end class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class CustomerAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end class FromInvoice < Stripe::StripeObject - attr_reader :action, :invoice + # The relation between this invoice and the cloned invoice + attr_reader :action + # The invoice that was cloned. + attr_reader :invoice end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class LastFinalizationError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. attr_reader :transaction_type end - attr_reader :mandate_options, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. attr_reader :enabled end - attr_reader :installments, :request_three_d_secure + # Attribute for field installments + attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -123,107 +269,247 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end - attr_reader :filters, :permissions, :prefetch + # Attribute for field filters + attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch end - attr_reader :financial_connections, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :us_bank_account end - attr_reader :default_mandate, :payment_method_options, :payment_method_types + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. attr_reader :page_size end - attr_reader :amount_tax_display, :pdf, :template, :template_version + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + attr_reader :amount_tax_display + # Invoice pdf rendering options + attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. + attr_reader :template + # Version of the rendering template that the invoice is using. + attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this invoice. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject - attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at + # The time that the invoice draft was finalized. + attr_reader :finalized_at + # The time that the invoice was marked uncollectible. + attr_reader :marked_uncollectible_at + # The time that the invoice was paid. + attr_reader :paid_at + # The time that the invoice was voided. + attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - attr_reader :behavior, :resumes_at + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_reader :behavior + # The time after which the subscription will resume collecting payments. + attr_reader :resumes_at end - attr_reader :metadata, :pause_collection + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - attr_reader :line_item_ids, :usage_gte + # The IDs of the line items that triggered the threshold invoice. + attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. + attr_reader :usage_gte end - attr_reader :amount_gte, :item_reasons + # The total invoice amount threshold boundary if it triggered the threshold invoice. + attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. + attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject - attr_reader :amount, :margin + # The amount, in cents (or local equivalent), of the reduction in line item amount. + attr_reader :amount + # The margin that was applied to get this margin amount. + attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # The margin that was applied to get this pretax credit amount. + attr_reader :margin + # Type of the pretax credit amount referenced. + attr_reader :type end class TotalTaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country + # The public name of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_name + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. attr_reader :account_tax_ids + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. attr_reader :amount_due + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. attr_reader :amount_overpaid + # The amount, in cents (or local equivalent), that was paid. attr_reader :amount_paid + # The difference between amount_due and amount_paid, in cents (or local equivalent). attr_reader :amount_remaining + # This is the sum of all the shipping amounts. attr_reader :amount_shipping + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. attr_reader :amounts_due + # ID of the Connect Application that created the invoice. attr_reader :application + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. attr_reader :application_fee_amount + # Attribute for field applies_to attr_reader :applies_to + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. attr_reader :attempt_count + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. attr_reader :attempted + # Attribute for field automatic_tax attr_reader :automatic_tax + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. attr_reader :automatically_finalizes_at + # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -234,140 +520,208 @@ class TransferData < Stripe::StripeObject # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. attr_reader :billing_reason + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. attr_reader :collection_method + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Custom fields displayed on the invoice. attr_reader :custom_fields + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_address + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_email + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_name + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_phone + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_shipping + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_exempt + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_ids + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. attr_reader :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. attr_reader :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source + # The tax rates applied to this invoice, if any. attr_reader :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. attr_reader :description + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. attr_reader :discount + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. attr_reader :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. attr_reader :effective_at + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :ending_balance + # Footer displayed on the invoice. attr_reader :footer + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. attr_reader :from_invoice + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. attr_reader :id + # Attribute for field issuer attr_reader :issuer + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. attr_reader :last_finalization_error + # The ID of the most recent non-draft revision of this invoice attr_reader :latest_revision + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. attr_reader :lines + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. attr_reader :next_payment_attempt + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. attr_reader :number + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. attr_reader :on_behalf_of + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. attr_reader :paid + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. attr_reader :paid_out_of_band + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. attr_reader :payment_intent + # Attribute for field payment_settings attr_reader :payment_settings + # Payments for this invoice attr_reader :payments + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_end + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_start + # Total amount of all post-payment credit notes issued for this invoice. attr_reader :post_payment_credit_notes_amount + # Total amount of all pre-payment credit notes issued for this invoice. attr_reader :pre_payment_credit_notes_amount + # The quote this invoice was generated from. attr_reader :quote + # This is the transaction number that appears on email receipts sent for this invoice. attr_reader :receipt_number + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. attr_reader :rendering + # The details of the cost of shipping, including the ShippingRate applied on the invoice. attr_reader :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. attr_reader :shipping_details + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. attr_reader :starting_balance + # Extra information about an invoice for the customer's credit card statement. attr_reader :statement_descriptor + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # Attribute for field subscription attr_reader :subscription + # Details about the subscription that created this invoice. attr_reader :subscription_details + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. attr_reader :subscription_proration_date + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated attr_reader :subtotal + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated attr_reader :subtotal_excluding_tax + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. attr_reader :tax + # ID of the test clock this invoice belongs to. attr_reader :test_clock + # Attribute for field threshold_reason attr_reader :threshold_reason + # Total after discounts and taxes. attr_reader :total + # The aggregate amounts calculated per discount across all line items. attr_reader :total_discount_amounts + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. attr_reader :total_excluding_tax + # The aggregate amounts calculated per margin across all line items. attr_reader :total_margin_amounts + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. attr_reader :total_pretax_credit_amounts + # The aggregate amounts calculated per tax rate for all line items. attr_reader :total_tax_amounts + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. attr_reader :transfer_data + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. attr_reader :webhooks_delivered_at end diff --git a/lib/stripe/resources/quote_preview_subscription_schedule.rb b/lib/stripe/resources/quote_preview_subscription_schedule.rb index b17e42851..f91baab9d 100644 --- a/lib/stripe/resources/quote_preview_subscription_schedule.rb +++ b/lib/stripe/resources/quote_preview_subscription_schedule.rb @@ -9,161 +9,370 @@ def self.object_name end class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class CurrentPhase < Stripe::StripeObject - attr_reader :end_date, :start_date + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The start of this phase of the subscription schedule. + attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # Attribute for field issuer + attr_reader :issuer end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end - attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Attribute for field invoice_settings + attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - attr_reader :source_price, :target_price + # The original price to be migrated. + attr_reader :source_price + # The intended resulting price of the migration. + attr_reader :target_price end - attr_reader :errored_at, :failed_transitions, :type + # The time at which the price migration encountered an error. + attr_reader :errored_at + # The involved price pairs in each failed transition. + attr_reader :failed_transitions + # The type of error encountered by the price migration. + attr_reader :type end class Phase < Stripe::StripeObject class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end - attr_reader :discounts, :price, :quantity, :tax_rates + # The stackable discounts that will be applied to the item. + attr_reader :discounts + # ID of the price used to generate the invoice item. + attr_reader :price + # The quantity of the invoice item. + attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the plan to which the customer should be subscribed. + attr_reader :plan + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end - attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. + attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. + attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + attr_reader :discounts + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The invoice settings applicable during this phase. + attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. + attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. + attr_reader :proration_behavior + # The start of this phase of the subscription schedule. + attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries + attr_reader :trial_continuation + # When the trial ends within the phase. + attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. + attr_reader :trial_settings end class Prebilling < Stripe::StripeObject - attr_reader :invoice, :period_end, :period_start, :update_behavior + # ID of the prebilling invoice. + attr_reader :invoice + # The end of the last period for which the invoice pre-bills. + attr_reader :period_end + # The start of the first period for which the invoice pre-bills. + attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + attr_reader :update_behavior end # ID of the Connect Application that created the schedule. attr_reader :application + # Attribute for field applies_to attr_reader :applies_to + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. attr_reader :completed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. attr_reader :current_phase + # ID of the customer who owns the subscription schedule. attr_reader :customer + # Attribute for field default_settings attr_reader :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. attr_reader :end_behavior + # Unique identifier for the object. attr_reader :id + # Details of the most recent price migration that failed for the subscription schedule. attr_reader :last_price_migration_error + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Configuration for the subscription schedule's phases. attr_reader :phases + # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. attr_reader :released_at + # ID of the subscription once managed by the subscription schedule (if it is released). attr_reader :released_subscription + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). attr_reader :status + # ID of the subscription managed by the subscription schedule. attr_reader :subscription + # ID of the test clock this subscription schedule belongs to. attr_reader :test_clock end diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb index 04f91876b..20be30f79 100644 --- a/lib/stripe/resources/radar/early_fraud_warning.rb +++ b/lib/stripe/resources/radar/early_fraud_warning.rb @@ -17,18 +17,25 @@ def self.object_name # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. attr_reader :actionable + # ID of the charge this early fraud warning is for, optionally expanded. attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. attr_reader :fraud_type + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the Payment Intent this early fraud warning is for, optionally expanded. attr_reader :payment_intent diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb index bfe3302be..92464bf57 100644 --- a/lib/stripe/resources/radar/value_list.rb +++ b/lib/stripe/resources/radar/value_list.rb @@ -19,24 +19,34 @@ def self.object_name # The name of the value list for use in rules. attr_reader :alias + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The name or email address of the user who created this value list. attr_reader :created_by + # Unique identifier for the object. attr_reader :id + # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. attr_reader :item_type + # List of items contained within this value list. attr_reader :list_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The name of the value list. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb index e2871b7b3..5f98cbfc6 100644 --- a/lib/stripe/resources/radar/value_list_item.rb +++ b/lib/stripe/resources/radar/value_list_item.rb @@ -18,18 +18,25 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The name or email address of the user who added this item to the value list. attr_reader :created_by + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The value of the item. attr_reader :value + # The identifier of the value list this item belongs to. attr_reader :value_list + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index 8e5e64856..6be35c196 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -26,15 +26,30 @@ class AmazonPay < Stripe::StripeObject; end class AuBankTransfer < Stripe::StripeObject; end class Blik < Stripe::StripeObject - attr_reader :network_decline_code, :reference, :reference_status + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + attr_reader :network_decline_code + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class BrBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Card < Stripe::StripeObject - attr_reader :reference, :reference_status, :reference_type, :type + # Value of the reference number assigned to the refund. + attr_reader :reference + # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status + # Type of the reference number assigned to the refund. + attr_reader :reference_type + # The type of refund. This can be `refund`, `reversal`, or `pending`. + attr_reader :type end class Cashapp < Stripe::StripeObject; end @@ -42,36 +57,57 @@ class CustomerCashBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject; end class EuBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class GbBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class JpBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Klarna < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class MxBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class P24 < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Paynow < Stripe::StripeObject; end @@ -81,69 +117,173 @@ class Revolut < Stripe::StripeObject; end class Sofort < Stripe::StripeObject; end class Swish < Stripe::StripeObject - attr_reader :network_decline_code, :reference, :reference_status + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + attr_reader :network_decline_code + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class ThBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class UsBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - attr_reader :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_bank_transfer, :blik, :br_bank_transfer, :card, :cashapp, :customer_cash_balance, :eps, :eu_bank_transfer, :gb_bank_transfer, :giropay, :grabpay, :id_bank_transfer, :jp_bank_transfer, :klarna, :multibanco, :mx_bank_transfer, :p24, :paynow, :paypal, :pix, :revolut, :sofort, :swish, :th_bank_transfer, :type, :us_bank_transfer, :wechat_pay, :zip + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_bank_transfer + attr_reader :au_bank_transfer + # Attribute for field blik + attr_reader :blik + # Attribute for field br_bank_transfer + attr_reader :br_bank_transfer + # Attribute for field card + attr_reader :card + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_cash_balance + attr_reader :customer_cash_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer + attr_reader :gb_bank_transfer + # Attribute for field giropay + attr_reader :giropay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field jp_bank_transfer + attr_reader :jp_bank_transfer + # Attribute for field klarna + attr_reader :klarna + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field mx_bank_transfer + attr_reader :mx_bank_transfer + # Attribute for field p24 + attr_reader :p24 + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field pix + attr_reader :pix + # Attribute for field revolut + attr_reader :revolut + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field th_bank_transfer + attr_reader :th_bank_transfer + # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. + attr_reader :type + # Attribute for field us_bank_transfer + attr_reader :us_bank_transfer + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class NextAction < Stripe::StripeObject class DisplayDetails < Stripe::StripeObject class EmailSent < Stripe::StripeObject - attr_reader :email_sent_at, :email_sent_to + # The timestamp when the email was sent. + attr_reader :email_sent_at + # The recipient's email address. + attr_reader :email_sent_to end - attr_reader :email_sent, :expires_at + # Attribute for field email_sent + attr_reader :email_sent + # The expiry timestamp. + attr_reader :expires_at end - attr_reader :display_details, :type + # Attribute for field display_details + attr_reader :display_details + # Type of the next action to perform. + attr_reader :type end # Amount, in cents (or local equivalent). attr_reader :amount + # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction + # ID of the charge that's refunded. attr_reader :charge + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). attr_reader :description + # Attribute for field destination_details attr_reader :destination_details + # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. attr_reader :failure_balance_transaction + # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. attr_reader :failure_reason + # Unique identifier for the object. attr_reader :id + # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. attr_reader :instructions_email + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Attribute for field next_action attr_reader :next_action + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the PaymentIntent that's refunded. attr_reader :payment_intent + # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). attr_reader :reason + # This is the transaction number that appears on email receipts sent for this refund. attr_reader :receipt_number + # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. attr_reader :source_transfer_reversal + # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). attr_reader :status + # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. attr_reader :transfer_reversal diff --git a/lib/stripe/resources/reporting/report_run.rb b/lib/stripe/resources/reporting/report_run.rb index b69c60b29..bbbc086cb 100644 --- a/lib/stripe/resources/reporting/report_run.rb +++ b/lib/stripe/resources/reporting/report_run.rb @@ -21,30 +21,54 @@ def self.object_name end class Parameters < Stripe::StripeObject - attr_reader :columns, :connected_account, :currency, :interval_end, :interval_start, :payout, :reporting_category, :timezone + # The set of output columns requested for inclusion in the report run. + attr_reader :columns + # Connected account ID by which to filter the report run. + attr_reader :connected_account + # Currency of objects to be included in the report run. + attr_reader :currency + # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. + attr_reader :interval_end + # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. + attr_reader :interval_start + # Payout ID by which to filter the report run. + attr_reader :payout + # Category of balance transactions to be included in the report run. + attr_reader :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + attr_reader :timezone end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # If something should go wrong during the run, a message about the failure (populated when # `status=failed`). attr_reader :error + # Unique identifier for the object. attr_reader :id + # `true` if the report is run on live mode data and `false` if it is run on test mode data. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field parameters attr_reader :parameters + # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. attr_reader :report_type + # The file object representing the result of the report run (populated when # `status=succeeded`). attr_reader :result + # Status of this report run. This will be `pending` when the run is initially created. # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. attr_reader :status + # Timestamp at which this run successfully finished (populated when # `status=succeeded`). Measured in seconds since the Unix epoch. attr_reader :succeeded_at diff --git a/lib/stripe/resources/reporting/report_type.rb b/lib/stripe/resources/reporting/report_type.rb index 65e2a9de2..3e1870cfc 100644 --- a/lib/stripe/resources/reporting/report_type.rb +++ b/lib/stripe/resources/reporting/report_type.rb @@ -21,20 +21,28 @@ def self.object_name # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_end + # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_start + # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) attr_reader :default_columns + # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Human-readable name of the Report Type attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # When this Report Type was latest updated. Measured in seconds since the Unix epoch. attr_reader :updated + # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. attr_reader :version diff --git a/lib/stripe/resources/reserve_transaction.rb b/lib/stripe/resources/reserve_transaction.rb index f12d71eaa..78b98dab1 100644 --- a/lib/stripe/resources/reserve_transaction.rb +++ b/lib/stripe/resources/reserve_transaction.rb @@ -10,12 +10,16 @@ def self.object_name # Attribute for field amount attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/reversal.rb b/lib/stripe/resources/reversal.rb index 9ae781796..135a51e88 100644 --- a/lib/stripe/resources/reversal.rb +++ b/lib/stripe/resources/reversal.rb @@ -25,22 +25,31 @@ def self.object_name # Amount, in cents (or local equivalent). attr_reader :amount + # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Linked payment refund for the transfer reversal. attr_reader :destination_payment_refund + # Unique identifier for the object. attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # ID of the refund responsible for the transfer reversal. attr_reader :source_refund + # ID of the transfer that was reversed. attr_reader :transfer diff --git a/lib/stripe/resources/review.rb b/lib/stripe/resources/review.rb index 239cad633..e3a4ddd8b 100644 --- a/lib/stripe/resources/review.rb +++ b/lib/stripe/resources/review.rb @@ -15,38 +15,67 @@ def self.object_name end class IpAddressLocation < Stripe::StripeObject - attr_reader :city, :country, :latitude, :longitude, :region + # The city where the payment originated. + attr_reader :city + # Two-letter ISO code representing the country where the payment originated. + attr_reader :country + # The geographic latitude where the payment originated. + attr_reader :latitude + # The geographic longitude where the payment originated. + attr_reader :longitude + # The state/county/province/region where the payment originated. + attr_reader :region end class Session < Stripe::StripeObject - attr_reader :browser, :device, :platform, :version + # The browser used in this browser session (e.g., `Chrome`). + attr_reader :browser + # Information about the device used for the browser session (e.g., `Samsung SM-G930T`). + attr_reader :device + # The platform for the browser session (e.g., `Macintosh`). + attr_reader :platform + # The version for the browser session (e.g., `61.0.3163.100`). + attr_reader :version end # The ZIP or postal code of the card used, if applicable. attr_reader :billing_zip + # The charge associated with this review. attr_reader :charge + # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. attr_reader :closed_reason + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # The IP address where the payment originated. attr_reader :ip_address + # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. attr_reader :ip_address_location + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # If `true`, the review needs action. attr_reader :open + # The reason the review was opened. One of `rule` or `manual`. attr_reader :opened_reason + # The PaymentIntent ID associated with this review, if one exists. attr_reader :payment_intent + # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. attr_reader :reason + # Information related to the browsing session of the user who initiated the payment. attr_reader :session diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index e3a12d879..735af7ffa 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -21,43 +21,139 @@ class AuBecsDebit < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject; end class Bancontact < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class Boleto < Stripe::StripeObject; end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class ThreeDSecure < Stripe::StripeObject - attr_reader :authentication_flow, :electronic_commerce_indicator, :result, :result_reason, :transaction_id, :version + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. + attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. + attr_reader :electronic_commerce_indicator + # Indicates the outcome of 3D Secure authentication. + attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. + attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. + attr_reader :transaction_id + # The version of 3D Secure that was used. + attr_reader :version end class Wallet < Stripe::StripeObject class ApplePay < Stripe::StripeObject; end class GooglePay < Stripe::StripeObject; end - attr_reader :apple_pay, :google_pay, :type + # Attribute for field apple_pay + attr_reader :apple_pay + # Attribute for field google_pay + attr_reader :google_pay + # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type end - attr_reader :brand, :checks, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :network, :three_d_secure, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Check results by Card networks on Card address and CVC at the time of authorization + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # Populated if this authorization used 3D Secure authentication. + attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end - attr_reader :generated_card, :offline + # The ID of the Card PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_card + # Details about payments collected offline. + attr_reader :offline end class Cashapp < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :bank, :bank_code, :bank_name, :display_name + # Bank where the account is located. + attr_reader :bank + # Local bank code of the bank. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class KakaoPay < Stripe::StripeObject; end @@ -70,48 +166,181 @@ class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the Sofort authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Sofort directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class UsBankAccount < Stripe::StripeObject; end - attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :card_present, :cashapp, :id_bank_transfer, :ideal, :kakao_pay, :klarna, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :sofort, :type, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class SetupError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. attr_reader :application + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. attr_reader :attach_to_self + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. attr_reader :customer + # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. attr_reader :flow_directions + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. attr_reader :on_behalf_of + # ID of the payment method used with this SetupAttempt. attr_reader :payment_method + # Attribute for field payment_method_details attr_reader :payment_method_details + # The error encountered during this attempt to confirm the SetupIntent, if any. attr_reader :setup_error + # ID of the SetupIntent that this attempt belongs to. attr_reader :setup_intent + # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. attr_reader :status + # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. attr_reader :usage diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index b0b0b978a..c40dba030 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -34,154 +34,370 @@ def self.object_name end class AutomaticPaymentMethods < Stripe::StripeObject - attr_reader :allow_redirects, :enabled + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + attr_reader :allow_redirects + # Automatically calculates compatible payment methods + attr_reader :enabled end class LastSetupError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class NextAction < Stripe::StripeObject class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - attr_reader :expires_at, :image_url_png, :image_url_svg + # The date (unix timestamp) when the QR code expires. + attr_reader :expires_at + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end - attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + attr_reader :hosted_instructions_url + # The url for mobile redirect based auth + attr_reader :mobile_auth_url + # Attribute for field qr_code + attr_reader :qr_code end class RedirectToUrl < Stripe::StripeObject - attr_reader :return_url, :url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate. + attr_reader :url end class VerifyWithMicrodeposits < Stripe::StripeObject - attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type + # The timestamp when the microdeposits are expected to land. + attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. + attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + attr_reader :microdeposit_type end - attr_reader :cashapp_handle_redirect_or_display_qr_code, :redirect_to_url, :type, :use_stripe_sdk, :verify_with_microdeposits + # Attribute for field cashapp_handle_redirect_or_display_qr_code + attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field redirect_to_url + attr_reader :redirect_to_url + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + attr_reader :type + # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits + attr_reader :verify_with_microdeposits end class PaymentMethodConfigurationDetails < Stripe::StripeObject - attr_reader :id, :parent + # ID of the payment method configuration used. + attr_reader :id + # ID of the parent payment method configuration used. + attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :currency, :mandate_options, :verification_method + # Currency supported by the bank account + attr_reader :currency + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class AmazonPay < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options attr_reader :mandate_options end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :currency, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types + # Amount to be charged for future payments. + attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_reader :amount_type + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_reader :interval_count + # Unique identifier for the mandate or subscription. + attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_reader :supported_types end - attr_reader :mandate_options, :network, :request_three_d_secure + # Configuration options for setting up an eMandate for cards issued in India. + attr_reader :mandate_options + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CardPresent < Stripe::StripeObject; end class Link < Stripe::StripeObject + # [Deprecated] This is a legacy parameter that no longer has any function. attr_reader :persistent_token end class Paypal < Stripe::StripeObject - attr_reader :billing_agreement_id, :currency, :subsellers + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_reader :billing_agreement_id + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_reader :start_date end + # Attribute for field mandate_options attr_reader :mandate_options end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options attr_reader :mandate_options end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. attr_reader :mode end - attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + # Attribute for field filters + attr_reader :filters + # Attribute for field manual_entry + attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method attr_reader :collection_method end - attr_reader :financial_connections, :mandate_options, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :amazon_pay, :bacs_debit, :card, :card_present, :link, :paypal, :payto, :sepa_debit, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field link + attr_reader :link + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field us_bank_account + attr_reader :us_bank_account end # ID of the Connect application that created the SetupIntent. attr_reader :application + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. attr_reader :attach_to_self + # Settings for dynamic payment methods compatible with this Setup Intent attr_reader :automatic_payment_methods + # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. attr_reader :cancellation_reason + # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. attr_reader :client_secret + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # ID of the Customer this SetupIntent belongs to, if one exists. # # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. attr_reader :flow_directions + # Unique identifier for the object. attr_reader :id + # The error encountered in the previous SetupIntent confirmation. attr_reader :last_setup_error + # The most recent SetupAttempt for this SetupIntent. attr_reader :latest_attempt + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # ID of the multi use Mandate generated by the SetupIntent. attr_reader :mandate + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. attr_reader :next_action + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) for which the setup is intended. attr_reader :on_behalf_of + # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. attr_reader :payment_method + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. attr_reader :payment_method_configuration_details + # Payment method-specific configuration for this SetupIntent. attr_reader :payment_method_options + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. attr_reader :payment_method_types + # ID of the single_use Mandate generated by the SetupIntent. attr_reader :single_use_mandate + # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. attr_reader :status + # Indicates how the payment method is intended to be used in the future. # # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. diff --git a/lib/stripe/resources/shipping_rate.rb b/lib/stripe/resources/shipping_rate.rb index d3d42f641..d7877f956 100644 --- a/lib/stripe/resources/shipping_rate.rb +++ b/lib/stripe/resources/shipping_rate.rb @@ -16,43 +16,71 @@ def self.object_name class DeliveryEstimate < Stripe::StripeObject class Maximum < Stripe::StripeObject - attr_reader :unit, :value + # A unit of time. + attr_reader :unit + # Must be greater than 0. + attr_reader :value end class Minimum < Stripe::StripeObject - attr_reader :unit, :value + # A unit of time. + attr_reader :unit + # Must be greater than 0. + attr_reader :value end - attr_reader :maximum, :minimum + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_reader :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_reader :minimum end class FixedAmount < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject - attr_reader :amount, :tax_behavior + # A non-negative integer in cents representing how much to charge. + attr_reader :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_reader :tax_behavior end - attr_reader :amount, :currency, :currency_options + # A non-negative integer in cents representing how much to charge. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options end # Whether the shipping rate can be used for new purchases. Defaults to `true`. attr_reader :active + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. attr_reader :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. attr_reader :display_name + # Attribute for field fixed_amount attr_reader :fixed_amount + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. attr_reader :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. attr_reader :tax_code + # The type of calculation to use on the shipping rate. attr_reader :type diff --git a/lib/stripe/resources/sigma/scheduled_query_run.rb b/lib/stripe/resources/sigma/scheduled_query_run.rb index 08cdacc6a..9443a693b 100644 --- a/lib/stripe/resources/sigma/scheduled_query_run.rb +++ b/lib/stripe/resources/sigma/scheduled_query_run.rb @@ -16,28 +16,39 @@ def self.object_name end class Error < Stripe::StripeObject + # Information about the run failure. attr_reader :message end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # When the query was run, Sigma contained a snapshot of your Stripe data at this time. attr_reader :data_load_time + # Attribute for field error attr_reader :error + # The file object representing the results of the query. attr_reader :file + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Time at which the result expires and is no longer available for download. attr_reader :result_available_until + # SQL for the query. attr_reader :sql + # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. attr_reader :status + # Title of the query. attr_reader :title diff --git a/lib/stripe/resources/source.rb b/lib/stripe/resources/source.rb index d6e752320..5ef265e9a 100644 --- a/lib/stripe/resources/source.rb +++ b/lib/stripe/resources/source.rb @@ -25,197 +25,679 @@ def self.object_name nested_resource_class_methods :source_transaction, operations: %i[retrieve list] class AchCreditTransfer < Stripe::StripeObject - attr_reader :account_number, :bank_name, :fingerprint, :refund_account_holder_name, :refund_account_holder_type, :refund_routing_number, :routing_number, :swift_code + # Attribute for field account_number + attr_reader :account_number + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field refund_account_holder_name + attr_reader :refund_account_holder_name + # Attribute for field refund_account_holder_type + attr_reader :refund_account_holder_type + # Attribute for field refund_routing_number + attr_reader :refund_routing_number + # Attribute for field routing_number + attr_reader :routing_number + # Attribute for field swift_code + attr_reader :swift_code end class AchDebit < Stripe::StripeObject - attr_reader :bank_name, :country, :fingerprint, :last4, :routing_number, :type + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field country + attr_reader :country + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 + # Attribute for field routing_number + attr_reader :routing_number + # Attribute for field type + attr_reader :type end class AcssDebit < Stripe::StripeObject - attr_reader :bank_address_city, :bank_address_line_1, :bank_address_line_2, :bank_address_postal_code, :bank_name, :category, :country, :fingerprint, :last4, :routing_number + # Attribute for field bank_address_city + attr_reader :bank_address_city + # Attribute for field bank_address_line_1 + attr_reader :bank_address_line_1 + # Attribute for field bank_address_line_2 + attr_reader :bank_address_line_2 + # Attribute for field bank_address_postal_code + attr_reader :bank_address_postal_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field category + attr_reader :category + # Attribute for field country + attr_reader :country + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 + # Attribute for field routing_number + attr_reader :routing_number end class Alipay < Stripe::StripeObject - attr_reader :data_string, :native_url, :statement_descriptor + # Attribute for field data_string + attr_reader :data_string + # Attribute for field native_url + attr_reader :native_url + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4 + # Attribute for field bsb_number + attr_reader :bsb_number + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 end class Bancontact < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :iban_last4, :preferred_language, :statement_descriptor + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field iban_last4 + attr_reader :iban_last4 + # Attribute for field preferred_language + attr_reader :preferred_language + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Card < Stripe::StripeObject - attr_reader :address_line1_check, :address_zip_check, :brand, :country, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method + # Attribute for field address_line1_check + attr_reader :address_line1_check + # Attribute for field address_zip_check + attr_reader :address_zip_check + # Attribute for field brand + attr_reader :brand + # Attribute for field country + attr_reader :country + # Attribute for field cvc_check + attr_reader :cvc_check + # Attribute for field description + attr_reader :description + # Attribute for field dynamic_last4 + attr_reader :dynamic_last4 + # Attribute for field exp_month + attr_reader :exp_month + # Attribute for field exp_year + attr_reader :exp_year + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field funding + attr_reader :funding + # Attribute for field iin + attr_reader :iin + # Attribute for field issuer + attr_reader :issuer + # Attribute for field last4 + attr_reader :last4 + # Attribute for field name + attr_reader :name + # Attribute for field three_d_secure + attr_reader :three_d_secure + # Attribute for field tokenization_method + attr_reader :tokenization_method end class CardPresent < Stripe::StripeObject - attr_reader :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :brand, :country, :cvm_type, :data_type, :dedicated_file_name, :description, :emv_auth_data, :evidence_customer_signature, :evidence_transaction_certificate, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :pos_device_id, :pos_entry_mode, :read_method, :reader, :terminal_verification_results, :transaction_status_information + # Attribute for field application_cryptogram + attr_reader :application_cryptogram + # Attribute for field application_preferred_name + attr_reader :application_preferred_name + # Attribute for field authorization_code + attr_reader :authorization_code + # Attribute for field authorization_response_code + attr_reader :authorization_response_code + # Attribute for field brand + attr_reader :brand + # Attribute for field country + attr_reader :country + # Attribute for field cvm_type + attr_reader :cvm_type + # Attribute for field data_type + attr_reader :data_type + # Attribute for field dedicated_file_name + attr_reader :dedicated_file_name + # Attribute for field description + attr_reader :description + # Attribute for field emv_auth_data + attr_reader :emv_auth_data + # Attribute for field evidence_customer_signature + attr_reader :evidence_customer_signature + # Attribute for field evidence_transaction_certificate + attr_reader :evidence_transaction_certificate + # Attribute for field exp_month + attr_reader :exp_month + # Attribute for field exp_year + attr_reader :exp_year + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field funding + attr_reader :funding + # Attribute for field iin + attr_reader :iin + # Attribute for field issuer + attr_reader :issuer + # Attribute for field last4 + attr_reader :last4 + # Attribute for field pos_device_id + attr_reader :pos_device_id + # Attribute for field pos_entry_mode + attr_reader :pos_entry_mode + # Attribute for field read_method + attr_reader :read_method + # Attribute for field reader + attr_reader :reader + # Attribute for field terminal_verification_results + attr_reader :terminal_verification_results + # Attribute for field transaction_status_information + attr_reader :transaction_status_information end class CodeVerification < Stripe::StripeObject - attr_reader :attempts_remaining, :status + # The number of attempts remaining to authenticate the source object with a verification code. + attr_reader :attempts_remaining + # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). + attr_reader :status end class Eps < Stripe::StripeObject - attr_reader :reference, :statement_descriptor + # Attribute for field reference + attr_reader :reference + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Giropay < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :statement_descriptor + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic, :iban_last4, :statement_descriptor + # Attribute for field bank + attr_reader :bank + # Attribute for field bic + attr_reader :bic + # Attribute for field iban_last4 + attr_reader :iban_last4 + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Klarna < Stripe::StripeObject - attr_reader :background_image_url, :client_token, :first_name, :last_name, :locale, :logo_url, :page_title, :pay_later_asset_urls_descriptive, :pay_later_asset_urls_standard, :pay_later_name, :pay_later_redirect_url, :pay_now_asset_urls_descriptive, :pay_now_asset_urls_standard, :pay_now_name, :pay_now_redirect_url, :pay_over_time_asset_urls_descriptive, :pay_over_time_asset_urls_standard, :pay_over_time_name, :pay_over_time_redirect_url, :payment_method_categories, :purchase_country, :purchase_type, :redirect_url, :shipping_delay, :shipping_first_name, :shipping_last_name + # Attribute for field background_image_url + attr_reader :background_image_url + # Attribute for field client_token + attr_reader :client_token + # Attribute for field first_name + attr_reader :first_name + # Attribute for field last_name + attr_reader :last_name + # Attribute for field locale + attr_reader :locale + # Attribute for field logo_url + attr_reader :logo_url + # Attribute for field page_title + attr_reader :page_title + # Attribute for field pay_later_asset_urls_descriptive + attr_reader :pay_later_asset_urls_descriptive + # Attribute for field pay_later_asset_urls_standard + attr_reader :pay_later_asset_urls_standard + # Attribute for field pay_later_name + attr_reader :pay_later_name + # Attribute for field pay_later_redirect_url + attr_reader :pay_later_redirect_url + # Attribute for field pay_now_asset_urls_descriptive + attr_reader :pay_now_asset_urls_descriptive + # Attribute for field pay_now_asset_urls_standard + attr_reader :pay_now_asset_urls_standard + # Attribute for field pay_now_name + attr_reader :pay_now_name + # Attribute for field pay_now_redirect_url + attr_reader :pay_now_redirect_url + # Attribute for field pay_over_time_asset_urls_descriptive + attr_reader :pay_over_time_asset_urls_descriptive + # Attribute for field pay_over_time_asset_urls_standard + attr_reader :pay_over_time_asset_urls_standard + # Attribute for field pay_over_time_name + attr_reader :pay_over_time_name + # Attribute for field pay_over_time_redirect_url + attr_reader :pay_over_time_redirect_url + # Attribute for field payment_method_categories + attr_reader :payment_method_categories + # Attribute for field purchase_country + attr_reader :purchase_country + # Attribute for field purchase_type + attr_reader :purchase_type + # Attribute for field redirect_url + attr_reader :redirect_url + # Attribute for field shipping_delay + attr_reader :shipping_delay + # Attribute for field shipping_first_name + attr_reader :shipping_first_name + # Attribute for field shipping_last_name + attr_reader :shipping_last_name end class Multibanco < Stripe::StripeObject - attr_reader :entity, :reference, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban + # Attribute for field entity + attr_reader :entity + # Attribute for field reference + attr_reader :reference + # Attribute for field refund_account_holder_address_city + attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country + attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 + attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 + attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code + attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state + attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name + attr_reader :refund_account_holder_name + # Attribute for field refund_iban + attr_reader :refund_iban end class Owner < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class VerifiedAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone, :verified_address, :verified_email, :verified_name, :verified_phone + # Owner's address. + attr_reader :address + # Owner's email address. + attr_reader :email + # Owner's full name. + attr_reader :name + # Owner's phone number (including extension). + attr_reader :phone + # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_address + # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email + # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name + # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_phone end class P24 < Stripe::StripeObject + # Attribute for field reference attr_reader :reference end class Paypal < Stripe::StripeObject - attr_reader :billing_agreement, :fingerprint, :payer_id, :reference_id, :reference_transaction_amount, :reference_transaction_charged, :statement_descriptor, :transaction_id, :verified_email + # Attribute for field billing_agreement + attr_reader :billing_agreement + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field payer_id + attr_reader :payer_id + # Attribute for field reference_id + attr_reader :reference_id + # Attribute for field reference_transaction_amount + attr_reader :reference_transaction_amount + # Attribute for field reference_transaction_charged + attr_reader :reference_transaction_charged + # Attribute for field statement_descriptor + attr_reader :statement_descriptor + # Attribute for field transaction_id + attr_reader :transaction_id + # Attribute for field verified_email + attr_reader :verified_email end class Receiver < Stripe::StripeObject - attr_reader :address, :amount_charged, :amount_received, :amount_returned, :refund_attributes_method, :refund_attributes_status + # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. + attr_reader :address + # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. + attr_reader :amount_charged + # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. + attr_reader :amount_received + # The total amount that was returned to the customer. The amount returned is expressed in the source's currency. + attr_reader :amount_returned + # Type of refund attribute method, one of `email`, `manual`, or `none`. + attr_reader :refund_attributes_method + # Type of refund attribute status, one of `missing`, `requested`, or `available`. + attr_reader :refund_attributes_status end class Redirect < Stripe::StripeObject - attr_reader :failure_reason, :return_url, :status, :url + # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. + attr_reader :failure_reason + # The URL you provide to redirect the customer to after they authenticated their payment. + attr_reader :return_url + # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). + attr_reader :status + # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. + attr_reader :url end class SepaCreditTransfer < Stripe::StripeObject - attr_reader :bank_name, :bic, :iban, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field iban + attr_reader :iban + # Attribute for field refund_account_holder_address_city + attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country + attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 + attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 + attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code + attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state + attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name + attr_reader :refund_account_holder_name + # Attribute for field refund_iban + attr_reader :refund_iban end class SepaDebit < Stripe::StripeObject - attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate_reference, :mandate_url + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field branch_code + attr_reader :branch_code + # Attribute for field country + attr_reader :country + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 + # Attribute for field mandate_reference + attr_reader :mandate_reference + # Attribute for field mandate_url + attr_reader :mandate_url end class Sofort < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :country, :iban_last4, :preferred_language, :statement_descriptor + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field country + attr_reader :country + # Attribute for field iban_last4 + attr_reader :iban_last4 + # Attribute for field preferred_language + attr_reader :preferred_language + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class SourceOrder < Stripe::StripeObject class Item < Stripe::StripeObject - attr_reader :amount, :currency, :description, :parent, :quantity, :type + # The amount (price) for this order item. + attr_reader :amount + # This currency of this order item. Required when `amount` is present. + attr_reader :currency + # Human-readable description for this order item. + attr_reader :description + # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). + attr_reader :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + attr_reader :quantity + # The type of this order item. Must be `sku`, `tax`, or `shipping`. + attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end - attr_reader :amount, :currency, :email, :items, :shipping + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The email address of the customer placing the order. + attr_reader :email + # List of items constituting the order. + attr_reader :items + # Attribute for field shipping + attr_reader :shipping end class ThreeDSecure < Stripe::StripeObject - attr_reader :address_line1_check, :address_zip_check, :authenticated, :brand, :card, :country, :customer, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method + # Attribute for field address_line1_check + attr_reader :address_line1_check + # Attribute for field address_zip_check + attr_reader :address_zip_check + # Attribute for field authenticated + attr_reader :authenticated + # Attribute for field brand + attr_reader :brand + # Attribute for field card + attr_reader :card + # Attribute for field country + attr_reader :country + # Attribute for field customer + attr_reader :customer + # Attribute for field cvc_check + attr_reader :cvc_check + # Attribute for field description + attr_reader :description + # Attribute for field dynamic_last4 + attr_reader :dynamic_last4 + # Attribute for field exp_month + attr_reader :exp_month + # Attribute for field exp_year + attr_reader :exp_year + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field funding + attr_reader :funding + # Attribute for field iin + attr_reader :iin + # Attribute for field issuer + attr_reader :issuer + # Attribute for field last4 + attr_reader :last4 + # Attribute for field name + attr_reader :name + # Attribute for field three_d_secure + attr_reader :three_d_secure + # Attribute for field tokenization_method + attr_reader :tokenization_method end class Wechat < Stripe::StripeObject - attr_reader :prepay_id, :qr_code_url, :statement_descriptor + # Attribute for field prepay_id + attr_reader :prepay_id + # Attribute for field qr_code_url + attr_reader :qr_code_url + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer + # Attribute for field ach_debit attr_reader :ach_debit + # Attribute for field acss_debit attr_reader :acss_debit + # Attribute for field alipay attr_reader :alipay + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. attr_reader :amount + # Attribute for field au_becs_debit attr_reader :au_becs_debit + # Attribute for field bancontact attr_reader :bancontact + # Attribute for field card attr_reader :card + # Attribute for field card_present attr_reader :card_present + # The client secret of the source. Used for client-side retrieval using a publishable key. attr_reader :client_secret + # Attribute for field code_verification attr_reader :code_verification + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. attr_reader :currency + # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. attr_reader :customer + # Attribute for field eps attr_reader :eps + # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. attr_reader :flow + # Attribute for field giropay attr_reader :giropay + # Unique identifier for the object. attr_reader :id + # Attribute for field ideal attr_reader :ideal + # Attribute for field klarna attr_reader :klarna + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Attribute for field multibanco attr_reader :multibanco + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Information about the owner of the payment instrument that may be used or required by particular source types. attr_reader :owner + # Attribute for field p24 attr_reader :p24 + # Attribute for field paypal attr_reader :paypal + # Attribute for field receiver attr_reader :receiver + # Attribute for field redirect attr_reader :redirect + # Attribute for field sepa_credit_transfer attr_reader :sepa_credit_transfer + # Attribute for field sepa_debit attr_reader :sepa_debit + # Attribute for field sofort attr_reader :sofort + # Attribute for field source_order attr_reader :source_order + # Extra information about a source. This will appear on your customer's statement every time you charge the source. attr_reader :statement_descriptor + # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. attr_reader :status + # Attribute for field three_d_secure attr_reader :three_d_secure + # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. attr_reader :type + # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. attr_reader :usage + # Attribute for field wechat attr_reader :wechat diff --git a/lib/stripe/resources/source_mandate_notification.rb b/lib/stripe/resources/source_mandate_notification.rb index ae94aec0c..e9342a5ac 100644 --- a/lib/stripe/resources/source_mandate_notification.rb +++ b/lib/stripe/resources/source_mandate_notification.rb @@ -12,34 +12,50 @@ def self.object_name end class AcssDebit < Stripe::StripeObject + # The statement descriptor associate with the debit. attr_reader :statement_descriptor end class BacsDebit < Stripe::StripeObject + # Last 4 digits of the account number associated with the debit. attr_reader :last4 end class SepaDebit < Stripe::StripeObject - attr_reader :creditor_identifier, :last4, :mandate_reference + # SEPA creditor ID. + attr_reader :creditor_identifier + # Last 4 digits of the account number associated with the debit. + attr_reader :last4 + # Mandate reference associated with the debit. + attr_reader :mandate_reference end # Attribute for field acss_debit attr_reader :acss_debit + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. attr_reader :amount + # Attribute for field bacs_debit attr_reader :bacs_debit + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. attr_reader :reason + # Attribute for field sepa_debit attr_reader :sepa_debit + # `Source` objects allow you to accept a variety of payment methods. They # represent a customer's payment instrument, and can be used with the Stripe API # just like a `Card` object: once chargeable, they can be charged, or can be @@ -51,8 +67,10 @@ class SepaDebit < Stripe::StripeObject # # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). attr_reader :source + # The status of the mandate notification. Valid statuses are `pending` or `submitted`. attr_reader :status + # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. attr_reader :type end diff --git a/lib/stripe/resources/source_transaction.rb b/lib/stripe/resources/source_transaction.rb index 028cf0afc..85f4b5e08 100644 --- a/lib/stripe/resources/source_transaction.rb +++ b/lib/stripe/resources/source_transaction.rb @@ -13,50 +13,100 @@ def self.object_name end class AchCreditTransfer < Stripe::StripeObject - attr_reader :customer_data, :fingerprint, :last4, :routing_number + # Customer data associated with the transfer. + attr_reader :customer_data + # Bank account fingerprint associated with the transfer. + attr_reader :fingerprint + # Last 4 digits of the account number associated with the transfer. + attr_reader :last4 + # Routing number associated with the transfer. + attr_reader :routing_number end class ChfCreditTransfer < Stripe::StripeObject - attr_reader :reference, :sender_address_country, :sender_address_line1, :sender_iban, :sender_name + # Reference associated with the transfer. + attr_reader :reference + # Sender's country address. + attr_reader :sender_address_country + # Sender's line 1 address. + attr_reader :sender_address_line1 + # Sender's bank account IBAN. + attr_reader :sender_iban + # Sender's name. + attr_reader :sender_name end class GbpCreditTransfer < Stripe::StripeObject - attr_reader :fingerprint, :funding_method, :last4, :reference, :sender_account_number, :sender_name, :sender_sort_code + # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. + attr_reader :fingerprint + # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. + attr_reader :funding_method + # Last 4 digits of sender account number associated with the transfer. + attr_reader :last4 + # Sender entered arbitrary information about the transfer. + attr_reader :reference + # Sender account number associated with the transfer. + attr_reader :sender_account_number + # Sender name associated with the transfer. + attr_reader :sender_name + # Sender sort code associated with the transfer. + attr_reader :sender_sort_code end class PaperCheck < Stripe::StripeObject - attr_reader :available_at, :invoices + # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. + attr_reader :available_at + # Comma-separated list of invoice IDs associated with the paper check. + attr_reader :invoices end class SepaCreditTransfer < Stripe::StripeObject - attr_reader :reference, :sender_iban, :sender_name + # Reference associated with the transfer. + attr_reader :reference + # Sender's bank account IBAN. + attr_reader :sender_iban + # Sender's name. + attr_reader :sender_name end # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. attr_reader :amount + # Attribute for field chf_credit_transfer attr_reader :chf_credit_transfer + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # Attribute for field gbp_credit_transfer attr_reader :gbp_credit_transfer + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field paper_check attr_reader :paper_check + # Attribute for field sepa_credit_transfer attr_reader :sepa_credit_transfer + # The ID of the source this transaction is attached to. attr_reader :source + # The status of the transaction, one of `succeeded`, `pending`, or `failed`. attr_reader :status + # The type of source this transaction is attached to. attr_reader :type end diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index c5403ff03..c2e07c430 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -18,69 +18,131 @@ def self.object_name class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # Whether Stripe automatically computes tax on this subscription. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingCycleAnchorConfig < Stripe::StripeObject - attr_reader :day_of_month, :hour, :minute, :month, :second + # The day of the month of the billing_cycle_anchor. + attr_reader :day_of_month + # The hour of the day of the billing_cycle_anchor. + attr_reader :hour + # The minute of the hour of the billing_cycle_anchor. + attr_reader :minute + # The month to start full cycle billing periods. + attr_reader :month + # The second of the minute of the billing_cycle_anchor. + attr_reader :second end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class CancellationDetails < Stripe::StripeObject - attr_reader :comment, :feedback, :reason + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + attr_reader :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + attr_reader :feedback + # Why this subscription was canceled. + attr_reader :reason end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :issuer + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + attr_reader :account_tax_ids + # Attribute for field issuer + attr_reader :issuer end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - attr_reader :source_price, :target_price + # The original price to be migrated. + attr_reader :source_price + # The intended resulting price of the migration. + attr_reader :target_price end - attr_reader :errored_at, :failed_transitions, :type + # The time at which the price migration encountered an error. + attr_reader :errored_at + # The involved price pairs in each failed transition. + attr_reader :failed_transitions + # The type of error encountered by the price migration. + attr_reader :type end class PauseCollection < Stripe::StripeObject - attr_reader :behavior, :resumes_at + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_reader :behavior + # The time after which the subscription will resume collecting payments. + attr_reader :resumes_at end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. attr_reader :transaction_type end - attr_reader :mandate_options, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :description + # Amount to be charged for future payments. + attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_reader :description end - attr_reader :mandate_options, :network, :request_three_d_secure + # Attribute for field mandate_options + attr_reader :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -90,123 +152,222 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end - attr_reader :filters, :permissions, :prefetch + # Attribute for field filters + attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch end - attr_reader :financial_connections, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. + attr_reader :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. + attr_reader :bancontact + # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. + attr_reader :card + # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. + attr_reader :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. + attr_reader :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. + attr_reader :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + attr_reader :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. + attr_reader :us_bank_account end - attr_reader :payment_method_options, :payment_method_types, :save_default_payment_method + # Payment-method-specific configuration to provide to invoices created by the subscription. + attr_reader :payment_method_options + # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + attr_reader :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. + attr_reader :save_default_payment_method end class PendingInvoiceItemInterval < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + attr_reader :interval_count end class PendingUpdate < Stripe::StripeObject - attr_reader :billing_cycle_anchor, :expires_at, :prebilling_iterations, :subscription_items, :trial_end, :trial_from_plan + # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + attr_reader :billing_cycle_anchor + # The point after which the changes reflected by this update will be discarded and no longer applied. + attr_reader :expires_at + # The number of iterations of prebilling to apply. + attr_reader :prebilling_iterations + # List of subscription items, each with an attached plan, that will be set if the update is applied. + attr_reader :subscription_items + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + attr_reader :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_reader :trial_from_plan end class Prebilling < Stripe::StripeObject - attr_reader :invoice, :period_end, :period_start, :update_behavior + # ID of the prebilling invoice. + attr_reader :invoice + # The end of the last period for which the invoice pre-bills. + attr_reader :period_end + # The start of the first period for which the invoice pre-bills. + attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + attr_reader :update_behavior end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. attr_reader :end_behavior end # ID of the Connect Application that created the subscription. attr_reader :application + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. attr_reader :application_fee_percent + # Attribute for field automatic_tax attr_reader :automatic_tax + # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. attr_reader :billing_cycle_anchor + # The fixed values used to calculate the `billing_cycle_anchor`. attr_reader :billing_cycle_anchor_config + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period attr_reader :billing_thresholds + # A date in the future at which the subscription will automatically get canceled attr_reader :cancel_at + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. attr_reader :cancel_at_period_end + # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. attr_reader :canceled_at + # Details about why this subscription was cancelled attr_reader :cancellation_details + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. attr_reader :collection_method + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. attr_reader :current_period_end + # Start of the current period that the subscription has been invoiced for. attr_reader :current_period_start + # ID of the customer who owns the subscription. attr_reader :customer + # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. attr_reader :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. attr_reader :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_reader :description + # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. attr_reader :discount + # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # If the subscription has ended, the date the subscription ended. attr_reader :ended_at + # Unique identifier for the object. attr_reader :id + # Attribute for field invoice_settings attr_reader :invoice_settings + # List of subscription items, each with an attached price. attr_reader :items + # Details of the most recent price migration that failed for the subscription. attr_reader :last_price_migration_error + # The most recent invoice this subscription has generated. attr_reader :latest_invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. attr_reader :next_pending_invoice_item_invoice + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). attr_reader :pause_collection + # Payment settings passed on to invoices created by the subscription. attr_reader :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. attr_reader :pending_invoice_item_interval + # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). attr_reader :pending_setup_intent + # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. attr_reader :pending_update + # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling + # The schedule attached to the subscription attr_reader :schedule + # Date when the subscription was first created. The date might differ from the `created` date due to backdating. attr_reader :start_date + # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. # # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. @@ -219,14 +380,19 @@ class EndBehavior < Stripe::StripeObject # # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. attr_reader :status + # ID of the test clock this subscription belongs to. attr_reader :test_clock + # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. attr_reader :transfer_data + # If the subscription has a trial, the end of that trial. attr_reader :trial_end + # Settings related to subscription trials. attr_reader :trial_settings + # If the subscription has a trial, the beginning of that trial. attr_reader :trial_start diff --git a/lib/stripe/resources/subscription_item.rb b/lib/stripe/resources/subscription_item.rb index 053b0f159..8b8b4bdaa 100644 --- a/lib/stripe/resources/subscription_item.rb +++ b/lib/stripe/resources/subscription_item.rb @@ -22,24 +22,34 @@ def self.object_name resource_plural: "usage_record_summaries" class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period attr_reader :billing_thresholds + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts + # Unique identifier for the object. attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. # # Plans define the base price, currency, and billing cycle for recurring purchases of products. @@ -49,6 +59,7 @@ class Trial < Stripe::StripeObject # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). attr_reader :plan + # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. # @@ -56,14 +67,19 @@ class Trial < Stripe::StripeObject # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). attr_reader :price + # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. attr_reader :quantity + # The `subscription` this `subscription_item` belongs to. attr_reader :subscription + # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. attr_reader :tax_rates + # Options that configure the trial on the subscription item. attr_reader :trial + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 753fafee2..05a9827b1 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -16,155 +16,358 @@ def self.object_name end class CurrentPhase < Stripe::StripeObject - attr_reader :end_date, :start_date + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The start of this phase of the subscription schedule. + attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # Attribute for field issuer + attr_reader :issuer end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end - attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Attribute for field invoice_settings + attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - attr_reader :source_price, :target_price + # The original price to be migrated. + attr_reader :source_price + # The intended resulting price of the migration. + attr_reader :target_price end - attr_reader :errored_at, :failed_transitions, :type + # The time at which the price migration encountered an error. + attr_reader :errored_at + # The involved price pairs in each failed transition. + attr_reader :failed_transitions + # The type of error encountered by the price migration. + attr_reader :type end class Phase < Stripe::StripeObject class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end - attr_reader :discounts, :price, :quantity, :tax_rates + # The stackable discounts that will be applied to the item. + attr_reader :discounts + # ID of the price used to generate the invoice item. + attr_reader :price + # The quantity of the invoice item. + attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the plan to which the customer should be subscribed. + attr_reader :plan + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end - attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. + attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. + attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + attr_reader :discounts + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The invoice settings applicable during this phase. + attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. + attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. + attr_reader :proration_behavior + # The start of this phase of the subscription schedule. + attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries + attr_reader :trial_continuation + # When the trial ends within the phase. + attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. + attr_reader :trial_settings end class Prebilling < Stripe::StripeObject - attr_reader :invoice, :period_end, :period_start, :update_behavior + # ID of the prebilling invoice. + attr_reader :invoice + # The end of the last period for which the invoice pre-bills. + attr_reader :period_end + # The start of the first period for which the invoice pre-bills. + attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + attr_reader :update_behavior end # ID of the Connect Application that created the schedule. attr_reader :application + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. attr_reader :completed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. attr_reader :current_phase + # ID of the customer who owns the subscription schedule. attr_reader :customer + # Attribute for field default_settings attr_reader :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. attr_reader :end_behavior + # Unique identifier for the object. attr_reader :id + # Details of the most recent price migration that failed for the subscription schedule. attr_reader :last_price_migration_error + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Configuration for the subscription schedule's phases. attr_reader :phases + # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. attr_reader :released_at + # ID of the subscription once managed by the subscription schedule (if it is released). attr_reader :released_subscription + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). attr_reader :status + # ID of the subscription managed by the subscription schedule. attr_reader :subscription + # ID of the test clock this subscription schedule belongs to. attr_reader :test_clock diff --git a/lib/stripe/resources/tax/association.rb b/lib/stripe/resources/tax/association.rb index 7c2d100d1..1379412dd 100644 --- a/lib/stripe/resources/tax/association.rb +++ b/lib/stripe/resources/tax/association.rb @@ -15,34 +15,56 @@ class Committed < Stripe::StripeObject class Reversal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject class Committed < Stripe::StripeObject + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) attr_reader :transaction end class Errored < Stripe::StripeObject - attr_reader :reason, :refund_id + # Details on why we could not commit the reversal Tax Transaction + attr_reader :reason + # The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal. + attr_reader :refund_id end - attr_reader :committed, :errored + # Attribute for field committed + attr_reader :committed + # Attribute for field errored + attr_reader :errored end - attr_reader :status, :status_details + # Status of the attempted Tax Transaction reversal. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details end - attr_reader :reversals, :transaction + # Attempts to create Tax Transaction reversals + attr_reader :reversals + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) + attr_reader :transaction end class Errored < Stripe::StripeObject + # Details on why we could not commit the Tax Transaction attr_reader :reason end - attr_reader :committed, :errored + # Attribute for field committed + attr_reader :committed + # Attribute for field errored + attr_reader :errored end # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. attr_reader :calculation + # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. attr_reader :payment_intent + # Status of the Tax Association. attr_reader :status + # Attribute for field status_details attr_reader :status_details diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index 78abe4454..241bba6c8 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -16,73 +16,179 @@ def self.object_name class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override + # The customer's postal address (for example, home or business location). + attr_reader :address + # The type of customer address provided. + attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). + attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). + attr_reader :tax_ids + # The taxability override used for taxation. + attr_reader :taxability_override end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end + # Attribute for field address attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :display_name, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. + attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. + attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state end class TaxRateDetails < Stripe::StripeObject - attr_reader :display_name, :percentage_decimal, :tax_type + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Attribute for field jurisdiction + attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount end - attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. + attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + attr_reader :tax_code end class TaxBreakdown < Stripe::StripeObject class TaxRateDetails < Stripe::StripeObject class FlatAmount < Stripe::StripeObject - attr_reader :amount, :currency + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # Three-letter ISO currency code, in lowercase. + attr_reader :currency end - attr_reader :country, :flat_amount, :percentage_decimal, :rate_type, :state, :tax_type + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + attr_reader :flat_amount + # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. + attr_reader :percentage_decimal + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + attr_reader :rate_type + # State, county, province, or region. + attr_reader :state + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :inclusive, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Specifies whether the tax amount is included in the line item amount. + attr_reader :inclusive + # Attribute for field tax_rate_details + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount end # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_total + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. attr_reader :customer + # Attribute for field customer_details attr_reader :customer_details + # Timestamp of date at which the tax calculation will expire. attr_reader :expires_at + # Unique identifier for the calculation. attr_reader :id + # The list of items the customer is purchasing. attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The details of the ship from location, such as the address. attr_reader :ship_from_details + # The shipping cost details for the calculation. attr_reader :shipping_cost + # The amount of tax to be collected on top of the line item prices. attr_reader :tax_amount_exclusive + # The amount of tax already included in the line item prices. attr_reader :tax_amount_inclusive + # Breakdown of individual tax amounts that add up to the total. attr_reader :tax_breakdown + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. attr_reader :tax_date diff --git a/lib/stripe/resources/tax/calculation_line_item.rb b/lib/stripe/resources/tax/calculation_line_item.rb index ebaf3d4ff..48f167961 100644 --- a/lib/stripe/resources/tax/calculation_line_item.rb +++ b/lib/stripe/resources/tax/calculation_line_item.rb @@ -11,34 +11,67 @@ def self.object_name class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :display_name, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. + attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. + attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state end class TaxRateDetails < Stripe::StripeObject - attr_reader :display_name, :percentage_decimal, :tax_type + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Attribute for field jurisdiction + attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount end # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_tax + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). attr_reader :product + # The number of units of the item being purchased. For reversals, this is the quantity reversed. attr_reader :quantity + # A custom identifier for this line item. attr_reader :reference + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. attr_reader :tax_behavior + # Detailed account of taxes relevant to this line item. attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. attr_reader :tax_code end diff --git a/lib/stripe/resources/tax/form.rb b/lib/stripe/resources/tax/form.rb index e519aff9f..009f10d53 100644 --- a/lib/stripe/resources/tax/form.rb +++ b/lib/stripe/resources/tax/form.rb @@ -15,77 +15,125 @@ def self.object_name end class AuSerr < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class CaMrdp < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class EuDac7 < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class FilingStatus < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`. + attr_reader :country + # Indicates the level of the jurisdiction where the form was filed. + attr_reader :level + # [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. + attr_reader :state end - attr_reader :effective_at, :jurisdiction, :value + # Time when the filing status was updated. + attr_reader :effective_at + # Attribute for field jurisdiction + attr_reader :jurisdiction + # The current status of the filed form. + attr_reader :value end class GbMrdp < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class NzMrdp < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class Payee < Stripe::StripeObject - attr_reader :account, :external_reference, :type + # The ID of the payee's Stripe account. + attr_reader :account + # The external reference to this payee. + attr_reader :external_reference + # Either `account` or `external_reference`. + attr_reader :type end class Us1099K < Stripe::StripeObject + # Year represented by the information reported on the tax form. attr_reader :reporting_year end class Us1099Misc < Stripe::StripeObject + # Year represented by the information reported on the tax form. attr_reader :reporting_year end class Us1099Nec < Stripe::StripeObject + # Year represented by the information reported on the tax form. attr_reader :reporting_year end # Attribute for field au_serr attr_reader :au_serr + # Attribute for field ca_mrdp attr_reader :ca_mrdp + # The form that corrects this form, if any. attr_reader :corrected_by + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Attribute for field eu_dac7 attr_reader :eu_dac7 + # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. attr_reader :filing_statuses + # Attribute for field gb_mrdp attr_reader :gb_mrdp + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Attribute for field nz_mrdp attr_reader :nz_mrdp + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field payee attr_reader :payee + # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. attr_reader :type + # Attribute for field us_1099_k attr_reader :us_1099_k + # Attribute for field us_1099_misc attr_reader :us_1099_misc + # Attribute for field us_1099_nec attr_reader :us_1099_nec diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb index 08d2e9534..66a4bb9f3 100644 --- a/lib/stripe/resources/tax/registration.rb +++ b/lib/stripe/resources/tax/registration.rb @@ -20,380 +20,680 @@ def self.object_name class CountryOptions < Stripe::StripeObject class Ae < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class At < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Au < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Be < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Bg < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Bh < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class By < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ca < Stripe::StripeObject class ProvinceStandard < Stripe::StripeObject + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). attr_reader :province end - attr_reader :province_standard, :type + # Attribute for field province_standard + attr_reader :province_standard + # Type of registration in Canada. + attr_reader :type end class Ch < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Cl < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Co < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Cr < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Cy < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Cz < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class De < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Dk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Ec < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ee < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Eg < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Es < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Fi < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Fr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Gb < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ge < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Gr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Hr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Hu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Id < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ie < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Is < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class It < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Jp < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ke < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Kr < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Kz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Lt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Lu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Lv < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Ma < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Md < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Mt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Mx < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class My < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ng < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Nl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class No < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Nz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Om < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Pl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Pt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Ro < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Rs < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ru < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Sa < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Se < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Sg < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Si < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Sk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Th < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Tr < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Tz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Us < Stripe::StripeObject class LocalAmusementTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. attr_reader :jurisdiction end class LocalLeaseTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. attr_reader :jurisdiction end class StateSalesTax < Stripe::StripeObject class Election < Stripe::StripeObject - attr_reader :jurisdiction, :type + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + attr_reader :jurisdiction + # The type of the election for the state sales tax registration. + attr_reader :type end + # Elections for the state sales tax registration. attr_reader :elections end - attr_reader :local_amusement_tax, :local_lease_tax, :state, :state_sales_tax, :type + # Attribute for field local_amusement_tax + attr_reader :local_amusement_tax + # Attribute for field local_lease_tax + attr_reader :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + attr_reader :state + # Attribute for field state_sales_tax + attr_reader :state_sales_tax + # Type of registration in the US. + attr_reader :type end class Uz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Vn < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Za < Stripe::StripeObject - attr_reader :type - end - attr_reader :ae, :at, :au, :be, :bg, :bh, :by, :ca, :ch, :cl, :co, :cr, :cy, :cz, :de, :dk, :ec, :ee, :eg, :es, :fi, :fr, :gb, :ge, :gr, :hr, :hu, :id, :ie, :is, :it, :jp, :ke, :kr, :kz, :lt, :lu, :lv, :ma, :md, :mt, :mx, :my, :ng, :nl, :no, :nz, :om, :pl, :pt, :ro, :rs, :ru, :sa, :se, :sg, :si, :sk, :th, :tr, :tz, :us, :uz, :vn, :za + # Type of registration in `country`. + attr_reader :type + end + # Attribute for field ae + attr_reader :ae + # Attribute for field at + attr_reader :at + # Attribute for field au + attr_reader :au + # Attribute for field be + attr_reader :be + # Attribute for field bg + attr_reader :bg + # Attribute for field bh + attr_reader :bh + # Attribute for field by + attr_reader :by + # Attribute for field ca + attr_reader :ca + # Attribute for field ch + attr_reader :ch + # Attribute for field cl + attr_reader :cl + # Attribute for field co + attr_reader :co + # Attribute for field cr + attr_reader :cr + # Attribute for field cy + attr_reader :cy + # Attribute for field cz + attr_reader :cz + # Attribute for field de + attr_reader :de + # Attribute for field dk + attr_reader :dk + # Attribute for field ec + attr_reader :ec + # Attribute for field ee + attr_reader :ee + # Attribute for field eg + attr_reader :eg + # Attribute for field es + attr_reader :es + # Attribute for field fi + attr_reader :fi + # Attribute for field fr + attr_reader :fr + # Attribute for field gb + attr_reader :gb + # Attribute for field ge + attr_reader :ge + # Attribute for field gr + attr_reader :gr + # Attribute for field hr + attr_reader :hr + # Attribute for field hu + attr_reader :hu + # Attribute for field id + attr_reader :id + # Attribute for field ie + attr_reader :ie + # Attribute for field is + attr_reader :is + # Attribute for field it + attr_reader :it + # Attribute for field jp + attr_reader :jp + # Attribute for field ke + attr_reader :ke + # Attribute for field kr + attr_reader :kr + # Attribute for field kz + attr_reader :kz + # Attribute for field lt + attr_reader :lt + # Attribute for field lu + attr_reader :lu + # Attribute for field lv + attr_reader :lv + # Attribute for field ma + attr_reader :ma + # Attribute for field md + attr_reader :md + # Attribute for field mt + attr_reader :mt + # Attribute for field mx + attr_reader :mx + # Attribute for field my + attr_reader :my + # Attribute for field ng + attr_reader :ng + # Attribute for field nl + attr_reader :nl + # Attribute for field no + attr_reader :no + # Attribute for field nz + attr_reader :nz + # Attribute for field om + attr_reader :om + # Attribute for field pl + attr_reader :pl + # Attribute for field pt + attr_reader :pt + # Attribute for field ro + attr_reader :ro + # Attribute for field rs + attr_reader :rs + # Attribute for field ru + attr_reader :ru + # Attribute for field sa + attr_reader :sa + # Attribute for field se + attr_reader :se + # Attribute for field sg + attr_reader :sg + # Attribute for field si + attr_reader :si + # Attribute for field sk + attr_reader :sk + # Attribute for field th + attr_reader :th + # Attribute for field tr + attr_reader :tr + # Attribute for field tz + attr_reader :tz + # Attribute for field us + attr_reader :us + # Attribute for field uz + attr_reader :uz + # Attribute for field vn + attr_reader :vn + # Attribute for field za + attr_reader :za end # Time at which the registration becomes active. Measured in seconds since the Unix epoch. attr_reader :active_from + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country + # Attribute for field country_options attr_reader :country_options + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. attr_reader :expires_at + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. attr_reader :status diff --git a/lib/stripe/resources/tax/settings.rb b/lib/stripe/resources/tax/settings.rb index d7e9cf3a3..2a8048b7c 100644 --- a/lib/stripe/resources/tax/settings.rb +++ b/lib/stripe/resources/tax/settings.rb @@ -15,13 +15,28 @@ def self.object_name end class Defaults < Stripe::StripeObject - attr_reader :tax_behavior, :tax_code + # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. + attr_reader :tax_behavior + # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. + attr_reader :tax_code end class HeadOffice < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end + # Attribute for field address attr_reader :address end @@ -29,20 +44,29 @@ class StatusDetails < Stripe::StripeObject class Active < Stripe::StripeObject; end class Pending < Stripe::StripeObject + # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. attr_reader :missing_fields end - attr_reader :active, :pending + # Attribute for field active + attr_reader :active + # Attribute for field pending + attr_reader :pending end # Attribute for field defaults attr_reader :defaults + # The place where your business is located. attr_reader :head_office + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The status of the Tax `Settings`. attr_reader :status + # Attribute for field status_details attr_reader :status_details end diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb index c9620bccd..67b1c0c52 100644 --- a/lib/stripe/resources/tax/transaction.rb +++ b/lib/stripe/resources/tax/transaction.rb @@ -14,69 +14,154 @@ def self.object_name class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override + # The customer's postal address (for example, home or business location). + attr_reader :address + # The type of customer address provided. + attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). + attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). + attr_reader :tax_ids + # The taxability override used for taxation. + attr_reader :taxability_override end class Reversal < Stripe::StripeObject + # The `id` of the reversed `Transaction` object. attr_reader :original_transaction end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end + # Attribute for field address attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :display_name, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. + attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. + attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state end class TaxRateDetails < Stripe::StripeObject - attr_reader :display_name, :percentage_decimal, :tax_type + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Attribute for field jurisdiction + attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount end - attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) + attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + attr_reader :tax_code end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. attr_reader :customer + # Attribute for field customer_details attr_reader :customer_details + # Unique identifier for the transaction. attr_reader :id + # The tax collected or refunded, by line item. attr_reader :line_items + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The Unix timestamp representing when the tax liability is assumed or reduced. attr_reader :posted_at + # A custom unique identifier, such as 'myOrder_123'. attr_reader :reference + # If `type=reversal`, contains information about what was reversed. attr_reader :reversal + # The details of the ship from location, such as the address. attr_reader :ship_from_details + # The shipping cost details for the transaction. attr_reader :shipping_cost + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. attr_reader :tax_date + # If `reversal`, this transaction reverses an earlier transaction. attr_reader :type diff --git a/lib/stripe/resources/tax/transaction_line_item.rb b/lib/stripe/resources/tax/transaction_line_item.rb index 0ccae0f7d..08db51f98 100644 --- a/lib/stripe/resources/tax/transaction_line_item.rb +++ b/lib/stripe/resources/tax/transaction_line_item.rb @@ -10,32 +10,45 @@ def self.object_name end class Reversal < Stripe::StripeObject + # The `id` of the line item to reverse in the original transaction. attr_reader :original_line_item end # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_tax + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). attr_reader :product + # The number of units of the item being purchased. For reversals, this is the quantity reversed. attr_reader :quantity + # A custom identifier for this line item in the transaction. attr_reader :reference + # If `type=reversal`, contains information about what was reversed. attr_reader :reversal + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. attr_reader :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. attr_reader :tax_code + # If `reversal`, this line item reverses an earlier transaction. attr_reader :type end diff --git a/lib/stripe/resources/tax_code.rb b/lib/stripe/resources/tax_code.rb index f8fcee6f6..952eae56d 100644 --- a/lib/stripe/resources/tax_code.rb +++ b/lib/stripe/resources/tax_code.rb @@ -13,10 +13,13 @@ def self.object_name # A detailed description of which types of products the tax code represents. attr_reader :description + # Unique identifier for the object. attr_reader :id + # A short name for the tax code. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/tax_deducted_at_source.rb b/lib/stripe/resources/tax_deducted_at_source.rb index a504a626b..901aa4c72 100644 --- a/lib/stripe/resources/tax_deducted_at_source.rb +++ b/lib/stripe/resources/tax_deducted_at_source.rb @@ -10,12 +10,16 @@ def self.object_name # Unique identifier for the object. attr_reader :id + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. attr_reader :period_end + # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. attr_reader :period_start + # The TAN that was supplied to Stripe when TDS was assessed attr_reader :tax_deduction_account_number end diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb index 20f1c29cc..169fe1df8 100644 --- a/lib/stripe/resources/tax_id.rb +++ b/lib/stripe/resources/tax_id.rb @@ -17,32 +17,54 @@ def self.object_name end class Owner < Stripe::StripeObject - attr_reader :account, :application, :customer, :type + # The account being referenced when `type` is `account`. + attr_reader :account + # The Connect Application being referenced when `type` is `application`. + attr_reader :application + # The customer being referenced when `type` is `customer`. + attr_reader :customer + # Type of owner referenced. + attr_reader :type end class Verification < Stripe::StripeObject - attr_reader :status, :verified_address, :verified_name + # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + attr_reader :status + # Verified address. + attr_reader :verified_address + # Verified name. + attr_reader :verified_name end # Two-letter ISO code representing the country of the tax ID. attr_reader :country + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # ID of the customer. attr_reader :customer + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The account or customer the tax ID belongs to. attr_reader :owner + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` attr_reader :type + # Value of the tax ID. attr_reader :value + # Tax ID verification information. attr_reader :verification + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index 6fbcbe304..f566e95b7 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -16,44 +16,64 @@ def self.object_name end class FlatAmount < Stripe::StripeObject - attr_reader :amount, :currency + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # Three-letter ISO currency code, in lowercase. + attr_reader :currency end # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. attr_reader :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. attr_reader :description + # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. attr_reader :display_name + # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, # this percentage reflects the rate actually used to calculate tax based on the product's taxability # and whether the user is registered to collect taxes in the corresponding jurisdiction. attr_reader :effective_percentage + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. attr_reader :flat_amount + # Unique identifier for the object. attr_reader :id + # This specifies if the tax rate is inclusive or exclusive. attr_reader :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. attr_reader :jurisdiction + # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. attr_reader :jurisdiction_level + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. attr_reader :percentage + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. attr_reader :rate_type + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. attr_reader :state + # The high-level tax type, such as `vat` or `sales_tax`. attr_reader :tax_type diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb index 1788977a8..f7b7d2ae1 100644 --- a/lib/stripe/resources/terminal/configuration.rb +++ b/lib/stripe/resources/terminal/configuration.rb @@ -16,109 +16,231 @@ def self.object_name end class BbposWiseposE < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end class Offline < Stripe::StripeObject + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. attr_reader :enabled end class RebootWindow < Stripe::StripeObject - attr_reader :end_hour, :start_hour + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + attr_reader :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + attr_reader :start_hour end class StripeS700 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end class Tipping < Stripe::StripeObject class Aud < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Cad < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Chf < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Czk < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Dkk < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Eur < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Gbp < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Hkd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Myr < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Nok < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Nzd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Pln < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Sek < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Sgd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Usd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end - attr_reader :aud, :cad, :chf, :czk, :dkk, :eur, :gbp, :hkd, :myr, :nok, :nzd, :pln, :sek, :sgd, :usd + # Attribute for field aud + attr_reader :aud + # Attribute for field cad + attr_reader :cad + # Attribute for field chf + attr_reader :chf + # Attribute for field czk + attr_reader :czk + # Attribute for field dkk + attr_reader :dkk + # Attribute for field eur + attr_reader :eur + # Attribute for field gbp + attr_reader :gbp + # Attribute for field hkd + attr_reader :hkd + # Attribute for field myr + attr_reader :myr + # Attribute for field nok + attr_reader :nok + # Attribute for field nzd + attr_reader :nzd + # Attribute for field pln + attr_reader :pln + # Attribute for field sek + attr_reader :sek + # Attribute for field sgd + attr_reader :sgd + # Attribute for field usd + attr_reader :usd end class VerifoneP400 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end # Attribute for field bbpos_wisepos_e attr_reader :bbpos_wisepos_e + # Unique identifier for the object. attr_reader :id + # Whether this Configuration is the default for your account attr_reader :is_account_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String indicating the name of the Configuration object, set by the user attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field offline attr_reader :offline + # Attribute for field reboot_window attr_reader :reboot_window + # Attribute for field stripe_s700 attr_reader :stripe_s700 + # Attribute for field tipping attr_reader :tipping + # Attribute for field verifone_p400 attr_reader :verifone_p400 + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/terminal/connection_token.rb b/lib/stripe/resources/terminal/connection_token.rb index 4ed31ccb2..27f6bc24b 100644 --- a/lib/stripe/resources/terminal/connection_token.rb +++ b/lib/stripe/resources/terminal/connection_token.rb @@ -16,8 +16,10 @@ def self.object_name # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). attr_reader :location + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Your application should pass this token to the Stripe Terminal SDK. attr_reader :secret diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb index b6645ab85..b5bbfd9e5 100644 --- a/lib/stripe/resources/terminal/location.rb +++ b/lib/stripe/resources/terminal/location.rb @@ -18,22 +18,40 @@ def self.object_name end class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end # Attribute for field address attr_reader :address + # The ID of a configuration that will be used to customize all readers in this location. attr_reader :configuration_overrides + # The display name of the location. attr_reader :display_name + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index c57b5f984..493b031d6 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -21,117 +21,271 @@ class Action < Stripe::StripeObject class CollectInputs < Stripe::StripeObject class Input < Stripe::StripeObject class CustomText < Stripe::StripeObject - attr_reader :description, :skip_button, :submit_button, :title + # Customize the default description for this input + attr_reader :description + # Customize the default label for this input's skip button + attr_reader :skip_button + # Customize the default label for this input's submit button + attr_reader :submit_button + # Customize the default title for this input + attr_reader :title end class Email < Stripe::StripeObject + # The collected email address attr_reader :value end class Numeric < Stripe::StripeObject + # The collected number attr_reader :value end class Phone < Stripe::StripeObject + # The collected phone number attr_reader :value end class Selection < Stripe::StripeObject class Choice < Stripe::StripeObject - attr_reader :style, :value + # The button style for the choice + attr_reader :style + # A value to be selected + attr_reader :value end - attr_reader :choices, :value + # List of possible choices to be selected + attr_reader :choices + # The value of the selected choice + attr_reader :value end class Signature < Stripe::StripeObject + # The File ID of a collected signature image attr_reader :value end class Text < Stripe::StripeObject + # The collected text value attr_reader :value end class Toggle < Stripe::StripeObject - attr_reader :default_value, :description, :title, :value + # The toggle's default value + attr_reader :default_value + # The toggle's description text + attr_reader :description + # The toggle's title text + attr_reader :title + # The toggle's collected value + attr_reader :value end - attr_reader :custom_text, :email, :numeric, :phone, :required, :selection, :signature, :skipped, :text, :toggles, :type + # Default text of input being collected. + attr_reader :custom_text + # Information about a email being collected using a reader + attr_reader :email + # Information about a number being collected using a reader + attr_reader :numeric + # Information about a phone number being collected using a reader + attr_reader :phone + # Indicate that this input is required, disabling the skip button. + attr_reader :required + # Information about a selection being collected using a reader + attr_reader :selection + # Information about a signature being collected using a reader + attr_reader :signature + # Indicate that this input was skipped by the user. + attr_reader :skipped + # Information about text being collected using a reader + attr_reader :text + # List of toggles being collected. Values are present if collection is complete. + attr_reader :toggles + # Type of input being collected. + attr_reader :type end - attr_reader :inputs, :metadata + # List of inputs to be collected. + attr_reader :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata end class CollectPaymentMethod < Stripe::StripeObject class CollectConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - attr_reader :enable_customer_cancellation, :skip_tipping, :tipping + # Enable customer initiated cancellation when processing this payment. + attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_reader :skip_tipping + # Represents a per-transaction tipping configuration + attr_reader :tipping end - attr_reader :collect_config, :payment_intent, :payment_method, :stripe_account + # Represents a per-transaction override of a reader configuration + attr_reader :collect_config + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # Attribute for field stripe_account + attr_reader :stripe_account end class ConfirmPaymentIntent < Stripe::StripeObject - attr_reader :payment_intent, :stripe_account + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # Attribute for field stripe_account + attr_reader :stripe_account end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - attr_reader :enable_customer_cancellation, :skip_tipping, :tipping + # Enable customer initiated cancellation when processing this payment. + attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_reader :skip_tipping + # Represents a per-transaction tipping configuration + attr_reader :tipping end - attr_reader :payment_intent, :process_config, :stripe_account + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # Represents a per-transaction override of a reader configuration + attr_reader :process_config + # Attribute for field stripe_account + attr_reader :stripe_account end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject + # Enable customer initiated cancellation when processing this SetupIntent. attr_reader :enable_customer_cancellation end - attr_reader :generated_card, :process_config, :setup_intent + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Represents a per-setup override of a reader configuration + attr_reader :process_config + # Most recent SetupIntent processed by the reader. + attr_reader :setup_intent end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject + # Enable customer initiated cancellation when refunding this payment. attr_reader :enable_customer_cancellation end - attr_reader :amount, :charge, :metadata, :payment_intent, :reason, :refund, :refund_application_fee, :refund_payment_config, :reverse_transfer, :stripe_account + # The amount being refunded. + attr_reader :amount + # Charge that is being refunded. + attr_reader :charge + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Payment intent that is being refunded. + attr_reader :payment_intent + # The reason for the refund. + attr_reader :reason + # Unique identifier for the refund object. + attr_reader :refund + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + attr_reader :refund_application_fee + # Represents a per-transaction override of a reader configuration + attr_reader :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + attr_reader :reverse_transfer + # Attribute for field stripe_account + attr_reader :stripe_account end class SetReaderDisplay < Stripe::StripeObject class Cart < Stripe::StripeObject class LineItem < Stripe::StripeObject - attr_reader :amount, :description, :quantity + # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Description of the line item. + attr_reader :description + # The quantity of the line item. + attr_reader :quantity end - attr_reader :currency, :line_items, :tax, :total + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # List of line items in the cart. + attr_reader :line_items + # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :tax + # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :total end - attr_reader :cart, :type + # Cart object to be displayed by the reader. + attr_reader :cart + # Type of information to be displayed by the reader. + attr_reader :type end - attr_reader :collect_inputs, :collect_payment_method, :confirm_payment_intent, :failure_code, :failure_message, :process_payment_intent, :process_setup_intent, :refund_payment, :set_reader_display, :status, :type + # Represents a reader action to collect customer inputs + attr_reader :collect_inputs + # Represents a reader action to collect a payment method + attr_reader :collect_payment_method + # Represents a reader action to confirm a payment + attr_reader :confirm_payment_intent + # Failure code, only set if status is `failed`. + attr_reader :failure_code + # Detailed failure message, only set if status is `failed`. + attr_reader :failure_message + # Represents a reader action to process a payment intent + attr_reader :process_payment_intent + # Represents a reader action to process a setup intent + attr_reader :process_setup_intent + # Represents a reader action to refund a payment + attr_reader :refund_payment + # Represents a reader action to set the reader display + attr_reader :set_reader_display + # Status of the action performed by the reader. + attr_reader :status + # Type of action performed by the reader. + attr_reader :type end # The most recent action performed by the reader. attr_reader :action + # The current software version of the reader. attr_reader :device_sw_version + # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. attr_reader :device_type + # Unique identifier for the object. attr_reader :id + # The local IP address of the reader. attr_reader :ip_address + # Custom label given to the reader for easier identification. attr_reader :label + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The location identifier of the reader. attr_reader :location + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Serial number of the reader. attr_reader :serial_number + # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. attr_reader :status + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/terminal/reader_collected_data.rb b/lib/stripe/resources/terminal/reader_collected_data.rb index 4f9d1afaa..e890cd496 100644 --- a/lib/stripe/resources/terminal/reader_collected_data.rb +++ b/lib/stripe/resources/terminal/reader_collected_data.rb @@ -11,18 +11,24 @@ def self.object_name end class Magstripe < Stripe::StripeObject + # The raw magstripe data collected by the reader. attr_reader :data end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The magstripe data collected by the reader. attr_reader :magstripe + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The type of data collected by the reader. attr_reader :type end diff --git a/lib/stripe/resources/test_helpers/test_clock.rb b/lib/stripe/resources/test_helpers/test_clock.rb index 267261301..9cfd48451 100644 --- a/lib/stripe/resources/test_helpers/test_clock.rb +++ b/lib/stripe/resources/test_helpers/test_clock.rb @@ -18,28 +18,39 @@ def self.object_name class StatusDetails < Stripe::StripeObject class Advancing < Stripe::StripeObject + # The `frozen_time` that the Test Clock is advancing towards. attr_reader :target_frozen_time end + # Attribute for field advancing attr_reader :advancing end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Time at which this clock is scheduled to auto delete. attr_reader :deletes_after + # Time at which all objects belonging to this clock are frozen. attr_reader :frozen_time + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The custom name supplied at creation. attr_reader :name + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The status of the Test Clock. attr_reader :status + # Attribute for field status_details attr_reader :status_details + # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index afa3ab24e..967c7c186 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -38,24 +38,32 @@ def self.object_name # # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) attr_reader :bank_account + # You can store multiple cards on a customer in order to charge the customer # later. You can also store multiple debit cards on a recipient in order to # transfer to those cards later. # # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) attr_reader :card + # IP address of the client that generates the token. attr_reader :client_ip + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Type of the token: `account`, `bank_account`, `card`, or `pii`. attr_reader :type + # Determines if you have already used this token (you can only use tokens once). attr_reader :used diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb index b3366fb3a..82857279f 100644 --- a/lib/stripe/resources/topup.rb +++ b/lib/stripe/resources/topup.rb @@ -19,34 +19,49 @@ def self.object_name # Amount transferred. attr_reader :amount + # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. attr_reader :balance_transaction + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. attr_reader :expected_availability_date + # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). attr_reader :failure_code + # Message to user further explaining reason for top-up failure if available. attr_reader :failure_message + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The source field is deprecated. It might not always be present in the API response. attr_reader :source + # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. attr_reader :statement_descriptor + # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. attr_reader :status + # A string that identifies this top-up as part of a group. attr_reader :transfer_group diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb index 2473544fa..6b37c649a 100644 --- a/lib/stripe/resources/transfer.rb +++ b/lib/stripe/resources/transfer.rb @@ -27,36 +27,52 @@ def self.object_name # Amount in cents (or local equivalent) to be transferred. attr_reader :amount + # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). attr_reader :amount_reversed + # Balance transaction that describes the impact of this transfer on your account balance. attr_reader :balance_transaction + # Time that this record of the transfer was first created. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # ID of the Stripe account the transfer was sent to. attr_reader :destination + # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. attr_reader :destination_payment + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # A list of reversals that have been applied to the transfer. attr_reader :reversals + # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. attr_reader :reversed + # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. attr_reader :source_transaction + # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. attr_reader :source_type + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. attr_reader :transfer_group diff --git a/lib/stripe/resources/treasury/credit_reversal.rb b/lib/stripe/resources/treasury/credit_reversal.rb index c16a48a7b..33444780c 100644 --- a/lib/stripe/resources/treasury/credit_reversal.rb +++ b/lib/stripe/resources/treasury/credit_reversal.rb @@ -14,34 +14,48 @@ def self.object_name end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the CreditReversal changed status to `posted` attr_reader :posted_at end # Amount (in cents) transferred. attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The FinancialAccount to reverse funds from. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The rails used to reverse the funds. attr_reader :network + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ReceivedCredit being reversed. attr_reader :received_credit + # Status of the CreditReversal attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/debit_reversal.rb b/lib/stripe/resources/treasury/debit_reversal.rb index 394f649e1..f87c5bfe0 100644 --- a/lib/stripe/resources/treasury/debit_reversal.rb +++ b/lib/stripe/resources/treasury/debit_reversal.rb @@ -14,40 +14,56 @@ def self.object_name end class LinkedFlows < Stripe::StripeObject + # Set if there is an Issuing dispute associated with the DebitReversal. attr_reader :issuing_dispute end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the DebitReversal changed status to `completed`. attr_reader :completed_at end # Amount (in cents) transferred. attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # The FinancialAccount to reverse funds from. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Other flows linked to a DebitReversal. attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # The rails used to reverse the funds. attr_reader :network + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The ReceivedDebit being reversed. attr_reader :received_debit + # Status of the DebitReversal attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb index 9e1ba838a..275f8c2ff 100644 --- a/lib/stripe/resources/treasury/financial_account.rb +++ b/lib/stripe/resources/treasury/financial_account.rb @@ -16,59 +16,99 @@ def self.object_name end class Balance < Stripe::StripeObject - attr_reader :cash, :inbound_pending, :outbound_pending + # Funds the user can spend right now. + attr_reader :cash + # Funds not spendable yet, but will become available at a later time. + attr_reader :inbound_pending + # Funds in the account, but not spendable because they are being held for pending outbound flows. + attr_reader :outbound_pending end class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject - attr_reader :account_holder_name, :account_number, :account_number_last4, :bank_name, :routing_number + # The name of the person or business that owns the bank account. + attr_reader :account_holder_name + # The account number. + attr_reader :account_number + # The last four characters of the account number. + attr_reader :account_number_last4 + # Name of the bank. + attr_reader :bank_name + # Routing number for the account. + attr_reader :routing_number end - attr_reader :aba, :supported_networks, :type + # ABA Records contain U.S. bank account details per the ABA format. + attr_reader :aba + # The list of networks that the address supports + attr_reader :supported_networks + # The type of financial address + attr_reader :type end class PlatformRestrictions < Stripe::StripeObject - attr_reader :inbound_flows, :outbound_flows + # Restricts all inbound money movement. + attr_reader :inbound_flows + # Restricts all outbound money movement. + attr_reader :outbound_flows end class StatusDetails < Stripe::StripeObject class Closed < Stripe::StripeObject + # The array that contains reasons for a FinancialAccount closure. attr_reader :reasons end + # Details related to the closure of this FinancialAccount attr_reader :closed end # The array of paths to active Features in the Features hash. attr_reader :active_features + # Balance information for the FinancialAccount attr_reader :balance + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. attr_reader :display_name + # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. # Stripe or the platform can control Features via the requested field. attr_reader :features + # The set of credentials that resolve to a FinancialAccount. attr_reader :financial_addresses + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The array of paths to pending Features in the Features hash. attr_reader :pending_features + # The set of functionalities that the platform can restrict on the FinancialAccount. attr_reader :platform_restrictions + # The array of paths to restricted Features in the Features hash. attr_reader :restricted_features + # Status of this FinancialAccount. attr_reader :status + # Attribute for field status_details attr_reader :status_details + # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. attr_reader :supported_currencies diff --git a/lib/stripe/resources/treasury/financial_account_features.rb b/lib/stripe/resources/treasury/financial_account_features.rb index 716dab225..02f159ff0 100644 --- a/lib/stripe/resources/treasury/financial_account_features.rb +++ b/lib/stripe/resources/treasury/financial_account_features.rb @@ -13,92 +13,199 @@ def self.object_name class CardIssuing < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class DepositInsurance < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class FinancialAddresses < Stripe::StripeObject class Aba < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :bank, :requested, :status, :status_details + # Requested bank partner for this Financial Account + attr_reader :bank + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end + # Toggle settings for enabling/disabling the ABA address feature attr_reader :aba end class InboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end + # Toggle settings for enabling/disabling an ACH specific feature attr_reader :ach end class IntraStripeFlows < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class OutboundPayments < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end - attr_reader :ach, :us_domestic_wire + # Toggle settings for enabling/disabling an ACH specific feature + attr_reader :ach + # Toggle settings for enabling/disabling a feature + attr_reader :us_domestic_wire end class OutboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end - attr_reader :ach, :us_domestic_wire + # Toggle settings for enabling/disabling an ACH specific feature + attr_reader :ach + # Toggle settings for enabling/disabling a feature + attr_reader :us_domestic_wire end # Toggle settings for enabling/disabling a feature attr_reader :card_issuing + # Toggle settings for enabling/disabling a feature attr_reader :deposit_insurance + # Settings related to Financial Addresses features on a Financial Account attr_reader :financial_addresses + # InboundTransfers contains inbound transfers features for a FinancialAccount. attr_reader :inbound_transfers + # Toggle settings for enabling/disabling a feature attr_reader :intra_stripe_flows + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Settings related to Outbound Payments features on a Financial Account attr_reader :outbound_payments + # OutboundTransfers contains outbound transfers features for a FinancialAccount. attr_reader :outbound_transfers end diff --git a/lib/stripe/resources/treasury/inbound_transfer.rb b/lib/stripe/resources/treasury/inbound_transfer.rb index 8053b926c..3deb0bb8f 100644 --- a/lib/stripe/resources/treasury/inbound_transfer.rb +++ b/lib/stripe/resources/treasury/inbound_transfer.rb @@ -16,68 +16,130 @@ def self.object_name end class FailureDetails < Stripe::StripeObject + # Reason for the failure. attr_reader :code end class LinkedFlows < Stripe::StripeObject + # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. attr_reader :received_debit end class OriginPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_reader :network + # Routing number of the bank account. + attr_reader :routing_number end - attr_reader :billing_details, :type, :us_bank_account + # Attribute for field billing_details + attr_reader :billing_details + # The type of the payment method used in the InboundTransfer. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :failed_at, :succeeded_at + # Timestamp describing when an InboundTransfer changed status to `canceled`. + attr_reader :canceled_at + # Timestamp describing when an InboundTransfer changed status to `failed`. + attr_reader :failed_at + # Timestamp describing when an InboundTransfer changed status to `succeeded`. + attr_reader :succeeded_at end # Amount (in cents) transferred. attr_reader :amount + # Returns `true` if the InboundTransfer is able to be canceled. attr_reader :cancelable + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Details about this InboundTransfer's failure. Only set when status is `failed`. attr_reader :failure_details + # The FinancialAccount that received the funds. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Attribute for field linked_flows attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The origin payment method to be debited for an InboundTransfer. attr_reader :origin_payment_method + # Details about the PaymentMethod for an InboundTransfer. attr_reader :origin_payment_method_details + # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. attr_reader :returned + # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. attr_reader :statement_descriptor + # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/outbound_payment.rb b/lib/stripe/resources/treasury/outbound_payment.rb index 9e62d2575..8878731a5 100644 --- a/lib/stripe/resources/treasury/outbound_payment.rb +++ b/lib/stripe/resources/treasury/outbound_payment.rb @@ -20,85 +20,171 @@ def self.object_name class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class FinancialAccount < Stripe::StripeObject - attr_reader :id, :network + # Token of the FinancialAccount. + attr_reader :id + # The rails used to send funds. + attr_reader :network end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_reader :network + # Routing number of the bank account. + attr_reader :routing_number end - attr_reader :billing_details, :financial_account, :type, :us_bank_account + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field financial_account + attr_reader :financial_account + # The type of the payment method used in the OutboundPayment. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class EndUserDetails < Stripe::StripeObject - attr_reader :ip_address, :present + # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. + attr_reader :ip_address + # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + attr_reader :present end class ReturnedDetails < Stripe::StripeObject - attr_reader :code, :transaction + # Reason for the return. + attr_reader :code + # The Transaction associated with this object. + attr_reader :transaction end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :failed_at, :posted_at, :returned_at + # Timestamp describing when an OutboundPayment changed status to `canceled`. + attr_reader :canceled_at + # Timestamp describing when an OutboundPayment changed status to `failed`. + attr_reader :failed_at + # Timestamp describing when an OutboundPayment changed status to `posted`. + attr_reader :posted_at + # Timestamp describing when an OutboundPayment changed status to `returned`. + attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundPayment for payments sent over the `ach` network. attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - attr_reader :chips, :imad, :omad + # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + attr_reader :chips + # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + attr_reader :imad + # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + attr_reader :omad end - attr_reader :ach, :type, :us_domestic_wire + # Attribute for field ach + attr_reader :ach + # The US bank account network used to send funds. + attr_reader :type + # Attribute for field us_domestic_wire + attr_reader :us_domestic_wire end # Amount (in cents) transferred. attr_reader :amount + # Returns `true` if the object can be canceled, and `false` otherwise. attr_reader :cancelable + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. attr_reader :destination_payment_method + # Details about the PaymentMethod for an OutboundPayment. attr_reader :destination_payment_method_details + # Details about the end user. attr_reader :end_user_details + # The date when funds are expected to arrive in the destination account. attr_reader :expected_arrival_date + # The FinancialAccount that funds were pulled from. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Details about a returned OutboundPayment. Only set when the status is `returned`. attr_reader :returned_details + # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). attr_reader :statement_descriptor + # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # Details about network-specific tracking information if available. attr_reader :tracking_details + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/outbound_transfer.rb b/lib/stripe/resources/treasury/outbound_transfer.rb index 96bbc7d31..490fd9ccf 100644 --- a/lib/stripe/resources/treasury/outbound_transfer.rb +++ b/lib/stripe/resources/treasury/outbound_transfer.rb @@ -20,82 +20,163 @@ def self.object_name class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_reader :network + # Routing number of the bank account. + attr_reader :routing_number end - attr_reader :billing_details, :type, :us_bank_account + # Attribute for field billing_details + attr_reader :billing_details + # The type of the payment method used in the OutboundTransfer. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record attr_reader :addenda end - attr_reader :ach, :type + # Details about an ACH transaction. + attr_reader :ach + # The type of flow that originated the OutboundTransfer. + attr_reader :type end class ReturnedDetails < Stripe::StripeObject - attr_reader :code, :transaction + # Reason for the return. + attr_reader :code + # The Transaction associated with this object. + attr_reader :transaction end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :failed_at, :posted_at, :returned_at + # Timestamp describing when an OutboundTransfer changed status to `canceled` + attr_reader :canceled_at + # Timestamp describing when an OutboundTransfer changed status to `failed` + attr_reader :failed_at + # Timestamp describing when an OutboundTransfer changed status to `posted` + attr_reader :posted_at + # Timestamp describing when an OutboundTransfer changed status to `returned` + attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - attr_reader :chips, :imad, :omad + # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + attr_reader :chips + # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + attr_reader :imad + # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + attr_reader :omad end - attr_reader :ach, :type, :us_domestic_wire + # Attribute for field ach + attr_reader :ach + # The US bank account network used to send funds. + attr_reader :type + # Attribute for field us_domestic_wire + attr_reader :us_domestic_wire end # Amount (in cents) transferred. attr_reader :amount + # Returns `true` if the object can be canceled, and `false` otherwise. attr_reader :cancelable + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # The PaymentMethod used as the payment instrument for an OutboundTransfer. attr_reader :destination_payment_method + # Attribute for field destination_payment_method_details attr_reader :destination_payment_method_details + # The date when funds are expected to arrive in the destination account. attr_reader :expected_arrival_date + # The FinancialAccount that funds were pulled from. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # Details about the network used for the OutboundTransfer. attr_reader :network_details + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Details about a returned OutboundTransfer. Only set when the status is `returned`. attr_reader :returned_details + # Information about the OutboundTransfer to be sent to the recipient account. attr_reader :statement_descriptor + # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions + # Details about network-specific tracking information if available. attr_reader :tracking_details + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/received_credit.rb b/lib/stripe/resources/treasury/received_credit.rb index fe157d2c6..635915590 100644 --- a/lib/stripe/resources/treasury/received_credit.rb +++ b/lib/stripe/resources/treasury/received_credit.rb @@ -15,70 +15,157 @@ def self.object_name class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class FinancialAccount < Stripe::StripeObject - attr_reader :id, :network + # The FinancialAccount ID. + attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + attr_reader :network end class UsBankAccount < Stripe::StripeObject - attr_reader :bank_name, :last4, :routing_number + # Bank name. + attr_reader :bank_name + # The last four digits of the bank account number. + attr_reader :last4 + # The routing number for the bank account. + attr_reader :routing_number end - attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account + # Set when `type` is `balance`. + attr_reader :balance + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field financial_account + attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject class SourceFlowDetails < Stripe::StripeObject - attr_reader :credit_reversal, :outbound_payment, :payout, :type + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + attr_reader :credit_reversal + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + attr_reader :outbound_payment + # A `Payout` object is created when you receive funds from Stripe, or when you + # initiate a payout to either a bank account or debit card of a [connected + # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + # and list all payouts. Payouts are made on [varying + # schedules](/docs/connect/manage-payout-schedule), depending on your country and + # industry. + # + # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + attr_reader :payout + # The type of the source flow that originated the ReceivedCredit. + attr_reader :type end - attr_reader :credit_reversal, :issuing_authorization, :issuing_transaction, :source_flow, :source_flow_details, :source_flow_type + # The CreditReversal created as a result of this ReceivedCredit being reversed. + attr_reader :credit_reversal + # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + attr_reader :issuing_authorization + # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. + attr_reader :issuing_transaction + # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. + attr_reader :source_flow + # The expandable object of the source flow. + attr_reader :source_flow_details + # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). + attr_reader :source_flow_type end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record attr_reader :addenda end - attr_reader :ach, :type + # Details about an ACH transaction. + attr_reader :ach + # The type of flow that originated the ReceivedCredit. + attr_reader :type end class ReversalDetails < Stripe::StripeObject - attr_reader :deadline, :restricted_reason + # Time before which a ReceivedCredit can be reversed. + attr_reader :deadline + # Set if a ReceivedCredit cannot be reversed. + attr_reader :restricted_reason end # Amount (in cents) transferred. attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. attr_reader :failure_code + # The FinancialAccount that received the funds. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Attribute for field initiating_payment_method_details attr_reader :initiating_payment_method_details + # Attribute for field linked_flows attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The rails used to send the funds. attr_reader :network + # Details specific to the money movement rails. attr_reader :network_details + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Details describing when a ReceivedCredit may be reversed. attr_reader :reversal_details + # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. attr_reader :status + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/received_debit.rb b/lib/stripe/resources/treasury/received_debit.rb index 7fb18fa1a..f89784ebf 100644 --- a/lib/stripe/resources/treasury/received_debit.rb +++ b/lib/stripe/resources/treasury/received_debit.rb @@ -15,67 +15,136 @@ def self.object_name class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class FinancialAccount < Stripe::StripeObject - attr_reader :id, :network + # The FinancialAccount ID. + attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + attr_reader :network end class UsBankAccount < Stripe::StripeObject - attr_reader :bank_name, :last4, :routing_number + # Bank name. + attr_reader :bank_name + # The last four digits of the bank account number. + attr_reader :last4 + # The routing number for the bank account. + attr_reader :routing_number end - attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account + # Set when `type` is `balance`. + attr_reader :balance + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field financial_account + attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject - attr_reader :debit_reversal, :inbound_transfer, :issuing_authorization, :issuing_transaction, :payout, :received_credit_capital_withholding + # The DebitReversal created as a result of this ReceivedDebit being reversed. + attr_reader :debit_reversal + # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. + attr_reader :inbound_transfer + # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + attr_reader :issuing_authorization + # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. + attr_reader :issuing_transaction + # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + attr_reader :payout + # The ReceivedCredit that Capital withheld from + attr_reader :received_credit_capital_withholding end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record attr_reader :addenda end - attr_reader :ach, :type + # Details about an ACH transaction. + attr_reader :ach + # The type of flow that originated the ReceivedDebit. + attr_reader :type end class ReversalDetails < Stripe::StripeObject - attr_reader :deadline, :restricted_reason + # Time before which a ReceivedDebit can be reversed. + attr_reader :deadline + # Set if a ReceivedDebit can't be reversed. + attr_reader :restricted_reason end # Amount (in cents) transferred. attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. attr_reader :failure_code + # The FinancialAccount that funds were pulled from. attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url + # Unique identifier for the object. attr_reader :id + # Attribute for field initiating_payment_method_details attr_reader :initiating_payment_method_details + # Attribute for field linked_flows attr_reader :linked_flows + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # The network used for the ReceivedDebit. attr_reader :network + # Details specific to the money movement rails. attr_reader :network_details + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Details describing when a ReceivedDebit might be reversed. attr_reader :reversal_details + # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. attr_reader :status + # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/transaction.rb b/lib/stripe/resources/treasury/transaction.rb index 5ec9f7c4d..3d2dbf77f 100644 --- a/lib/stripe/resources/treasury/transaction.rb +++ b/lib/stripe/resources/treasury/transaction.rb @@ -13,44 +13,97 @@ def self.object_name end class BalanceImpact < Stripe::StripeObject - attr_reader :cash, :inbound_pending, :outbound_pending + # The change made to funds the user can spend right now. + attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. + attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject - attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. + attr_reader :type end class StatusTransitions < Stripe::StripeObject - attr_reader :posted_at, :void_at + # Timestamp describing when the Transaction changed status to `posted`. + attr_reader :posted_at + # Timestamp describing when the Transaction changed status to `void`. + attr_reader :void_at end # Amount (in cents) transferred. attr_reader :amount + # Change to a FinancialAccount's balance attr_reader :balance_impact + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description + # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. attr_reader :entries + # The FinancialAccount associated with this object. attr_reader :financial_account + # ID of the flow that created the Transaction. attr_reader :flow + # Details of the flow that created the Transaction. attr_reader :flow_details + # Type of the flow that created the Transaction. attr_reader :flow_type + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Status of the Transaction. attr_reader :status + # Attribute for field status_transitions attr_reader :status_transitions diff --git a/lib/stripe/resources/treasury/transaction_entry.rb b/lib/stripe/resources/treasury/transaction_entry.rb index a5d49a33c..81f724ac9 100644 --- a/lib/stripe/resources/treasury/transaction_entry.rb +++ b/lib/stripe/resources/treasury/transaction_entry.rb @@ -13,36 +13,84 @@ def self.object_name end class BalanceImpact < Stripe::StripeObject - attr_reader :cash, :inbound_pending, :outbound_pending + # The change made to funds the user can spend right now. + attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. + attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject - attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. + attr_reader :type end # Change to a FinancialAccount's balance attr_reader :balance_impact + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency + # When the TransactionEntry will impact the FinancialAccount's balance. attr_reader :effective_at + # The FinancialAccount associated with this object. attr_reader :financial_account + # Token of the flow associated with the TransactionEntry. attr_reader :flow + # Details of the flow associated with the TransactionEntry. attr_reader :flow_details + # Type of the flow associated with the TransactionEntry. attr_reader :flow_type + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The Transaction associated with this object. attr_reader :transaction + # The specific money movement that generated the TransactionEntry. attr_reader :type diff --git a/lib/stripe/resources/usage_record.rb b/lib/stripe/resources/usage_record.rb index a3b235383..4ee5ee93c 100644 --- a/lib/stripe/resources/usage_record.rb +++ b/lib/stripe/resources/usage_record.rb @@ -16,14 +16,19 @@ def self.object_name # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The usage quantity for the specified date. attr_reader :quantity + # The ID of the subscription item this usage record contains data for. attr_reader :subscription_item + # The timestamp when this usage occurred. attr_reader :timestamp end diff --git a/lib/stripe/resources/usage_record_summary.rb b/lib/stripe/resources/usage_record_summary.rb index 78e1fb4af..10c875ee3 100644 --- a/lib/stripe/resources/usage_record_summary.rb +++ b/lib/stripe/resources/usage_record_summary.rb @@ -10,20 +10,29 @@ def self.object_name end class Period < Stripe::StripeObject - attr_reader :end, :start + # The end date of this usage period. All usage up to and including this point in time is included. + attr_reader :end + # The start date of this usage period. All usage after this point in time is included. + attr_reader :start end # Unique identifier for the object. attr_reader :id + # The invoice in which this usage period has been billed for. attr_reader :invoice + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # Attribute for field period attr_reader :period + # The ID of the subscription item this summary is describing. attr_reader :subscription_item + # The total usage within this usage period. attr_reader :total_usage end diff --git a/lib/stripe/resources/v2/billing/meter_event.rb b/lib/stripe/resources/v2/billing/meter_event.rb index 108f37f4b..4828d3b59 100644 --- a/lib/stripe/resources/v2/billing/meter_event.rb +++ b/lib/stripe/resources/v2/billing/meter_event.rb @@ -13,18 +13,24 @@ def self.object_name # The creation time of this meter event. attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name + # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. attr_reader :identifier + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object + # The payload of the event. This must contain the fields corresponding to a meter’s # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and # `value_settings.event_payload_key` (default is `value`). Read more about the payload. attr_reader :payload + # The time of the event. Must be within the past 35 calendar days or up to # 5 minutes in the future. Defaults to current timestamp if not specified. attr_reader :timestamp diff --git a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb index 6a2ce37f8..85c44b302 100644 --- a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb @@ -11,22 +11,30 @@ def self.object_name end class Cancel < Stripe::StripeObject + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. attr_reader :identifier end # Specifies which event to cancel. attr_reader :cancel + # The time the adjustment was created. attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name + # The unique id of this meter event adjustment. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object + # Open Enum. The meter event adjustment’s status. attr_reader :status + # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. attr_reader :type end diff --git a/lib/stripe/resources/v2/billing/meter_event_session.rb b/lib/stripe/resources/v2/billing/meter_event_session.rb index b3c713557..295dfe22e 100644 --- a/lib/stripe/resources/v2/billing/meter_event_session.rb +++ b/lib/stripe/resources/v2/billing/meter_event_session.rb @@ -13,14 +13,19 @@ def self.object_name # The authentication token for this session. Use this token when calling the # high-throughput meter event API. attr_reader :authentication_token + # The creation time of this session. attr_reader :created + # The time at which this session will expire. attr_reader :expires_at + # The unique id of this auth session. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object end diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb index 2746c4bf4..da00e6243 100644 --- a/lib/stripe/resources/v2/event.rb +++ b/lib/stripe/resources/v2/event.rb @@ -11,22 +11,34 @@ def self.object_name class Reason < Stripe::StripeObject class Request < Stripe::StripeObject - attr_reader :id, :idempotency_key + # ID of the API request that caused the event. + attr_reader :id + # The idempotency key transmitted during the request. + attr_reader :idempotency_key end - attr_reader :type, :request + # Event reason type. + attr_reader :type + # Information on the API request that instigated the event. + attr_reader :request end # Authentication context needed to fetch the event or related object. attr_reader :context + # Time at which the object was created. attr_reader :created + # Unique identifier for the event. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object + # Reason for the event. attr_reader :reason + # The type of the event. attr_reader :type end diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb index a32bff467..060914691 100644 --- a/lib/stripe/resources/v2/event_destination.rb +++ b/lib/stripe/resources/v2/event_destination.rb @@ -11,50 +11,76 @@ def self.object_name class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject + # Reason event destination has been disabled. attr_reader :reason end + # Details about why the event destination has been disabled. attr_reader :disabled end class AmazonEventbridge < Stripe::StripeObject - attr_reader :aws_account_id, :aws_event_source_arn, :aws_event_source_status + # The AWS account ID. + attr_reader :aws_account_id + # The ARN of the AWS event source. + attr_reader :aws_event_source_arn + # The state of the AWS event source. + attr_reader :aws_event_source_status end class WebhookEndpoint < Stripe::StripeObject - attr_reader :signing_secret, :url + # The signing secret of the webhook endpoint, only includable on creation. + attr_reader :signing_secret + # The URL of the webhook endpoint, includable. + attr_reader :url end # Time at which the object was created. attr_reader :created + # An optional description of what the event destination is used for. attr_reader :description + # The list of events to enable for this endpoint. attr_reader :enabled_events + # Payload type of events being subscribed to. attr_reader :event_payload + # Where events should be routed from. attr_reader :events_from + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Metadata. attr_reader :metadata + # Event destination name. attr_reader :name + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object + # If using the snapshot event payload, the API version events are rendered as. attr_reader :snapshot_api_version + # Status. It can be set to either enabled or disabled. attr_reader :status + # Additional information about event destination status. attr_reader :status_details + # Event destination type. attr_reader :type + # Time at which the object was last updated. attr_reader :updated + # Amazon EventBridge configuration. attr_reader :amazon_eventbridge + # Webhook endpoint configuration. attr_reader :webhook_endpoint end diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index ae594fb04..c5a6eb774 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -22,28 +22,40 @@ def self.object_name # The API version events are rendered as for this webhook endpoint. attr_reader :api_version + # The ID of the associated Connect application. attr_reader :application + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created + # An optional description of what the webhook is used for. attr_reader :description + # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. attr_reader :enabled_events + # Unique identifier for the object. attr_reader :id + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object + # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. attr_reader :secret + # The status of the webhook. It can be `enabled` or `disabled`. attr_reader :status + # The URL of the webhook endpoint. attr_reader :url + # Always true for a deleted object attr_reader :deleted diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 2288425f5..628fb2ec2 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -18,650 +18,911 @@ module Stripe class Account < APIResource class BusinessProfile < Stripe::StripeObject class AnnualRevenue < Stripe::StripeObject + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. sig { returns(T.nilable(String)) } attr_reader :fiscal_year_end end class MonthlyEstimatedRevenue < Stripe::StripeObject + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end class SupportAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # The applicant's gross annual revenue for its preceding fiscal year. sig { returns(T.nilable(AnnualRevenue)) } attr_reader :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. sig { returns(T.nilable(Integer)) } attr_reader :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. sig { returns(T.nilable(String)) } attr_reader :mcc + # Attribute for field monthly_estimated_revenue sig { returns(MonthlyEstimatedRevenue) } attr_reader :monthly_estimated_revenue + # The customer-facing business name. sig { returns(T.nilable(String)) } attr_reader :name + # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. sig { returns(T.nilable(String)) } attr_reader :product_description + # A publicly available mailing address for sending support issues to. sig { returns(T.nilable(SupportAddress)) } attr_reader :support_address + # A publicly available email address for sending support issues to. sig { returns(T.nilable(String)) } attr_reader :support_email + # A publicly available phone number to call with support issues. sig { returns(T.nilable(String)) } attr_reader :support_phone + # A publicly available website for handling support issues. sig { returns(T.nilable(String)) } attr_reader :support_url + # The business's publicly available website. sig { returns(T.nilable(String)) } attr_reader :url end class Capabilities < Stripe::StripeObject + # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. sig { returns(String) } attr_reader :acss_debit_payments + # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. sig { returns(String) } attr_reader :affirm_payments + # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. sig { returns(String) } attr_reader :afterpay_clearpay_payments + # The status of the Alma capability of the account, or whether the account can directly process Alma payments. sig { returns(String) } attr_reader :alma_payments + # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. sig { returns(String) } attr_reader :amazon_pay_payments + # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. sig { returns(String) } attr_reader :au_becs_debit_payments + # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. sig { returns(String) } attr_reader :bacs_debit_payments + # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. sig { returns(String) } attr_reader :bancontact_payments + # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. sig { returns(String) } attr_reader :bank_transfer_payments + # The status of the blik payments capability of the account, or whether the account can directly process blik charges. sig { returns(String) } attr_reader :blik_payments + # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. sig { returns(String) } attr_reader :boleto_payments + # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards sig { returns(String) } attr_reader :card_issuing + # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. sig { returns(String) } attr_reader :card_payments + # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. sig { returns(String) } attr_reader :cartes_bancaires_payments + # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. sig { returns(String) } attr_reader :cashapp_payments + # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. sig { returns(String) } attr_reader :eps_payments + # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. sig { returns(String) } attr_reader :fpx_payments + # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. sig { returns(String) } attr_reader :gb_bank_transfer_payments + # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. sig { returns(String) } attr_reader :giropay_payments + # The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. sig { returns(String) } attr_reader :gopay_payments + # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. sig { returns(String) } attr_reader :grabpay_payments + # The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. sig { returns(String) } attr_reader :id_bank_transfer_payments + # The status of Bank BCA onboarding of the account. sig { returns(String) } attr_reader :id_bank_transfer_payments_bca + # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. sig { returns(String) } attr_reader :ideal_payments + # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. sig { returns(String) } attr_reader :india_international_payments + # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. sig { returns(String) } attr_reader :jcb_payments + # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. sig { returns(String) } attr_reader :jp_bank_transfer_payments + # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. sig { returns(String) } attr_reader :kakao_pay_payments + # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. sig { returns(String) } attr_reader :klarna_payments + # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. sig { returns(String) } attr_reader :konbini_payments + # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. sig { returns(String) } attr_reader :kr_card_payments + # The status of the legacy payments capability of the account. sig { returns(String) } attr_reader :legacy_payments + # The status of the link_payments capability of the account, or whether the account can directly process Link charges. sig { returns(String) } attr_reader :link_payments + # The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. sig { returns(String) } attr_reader :mb_way_payments + # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. sig { returns(String) } attr_reader :mobilepay_payments + # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. sig { returns(String) } attr_reader :multibanco_payments + # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. sig { returns(String) } attr_reader :mx_bank_transfer_payments + # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. sig { returns(String) } attr_reader :naver_pay_payments + # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. sig { returns(String) } attr_reader :oxxo_payments + # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. sig { returns(String) } attr_reader :p24_payments + # The status of the Payco capability of the account, or whether the account can directly process Payco payments. sig { returns(String) } attr_reader :payco_payments + # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. sig { returns(String) } attr_reader :paynow_payments + # The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. sig { returns(String) } attr_reader :paypal_payments + # The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. sig { returns(String) } attr_reader :payto_payments + # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. sig { returns(String) } attr_reader :promptpay_payments + # The status of the Qris capability of the account, or whether the account can directly process Qris payments. sig { returns(String) } attr_reader :qris_payments + # The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. sig { returns(String) } attr_reader :rechnung_payments + # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. sig { returns(String) } attr_reader :revolut_pay_payments + # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. sig { returns(String) } attr_reader :samsung_pay_payments + # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. sig { returns(String) } attr_reader :sepa_bank_transfer_payments + # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. sig { returns(String) } attr_reader :sepa_debit_payments + # The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. sig { returns(String) } attr_reader :shopeepay_payments + # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. sig { returns(String) } attr_reader :sofort_payments + # The status of the Swish capability of the account, or whether the account can directly process Swish payments. sig { returns(String) } attr_reader :swish_payments + # The status of the tax reporting 1099-K (US) capability of the account. sig { returns(String) } attr_reader :tax_reporting_us_1099_k + # The status of the tax reporting 1099-MISC (US) capability of the account. sig { returns(String) } attr_reader :tax_reporting_us_1099_misc + # The status of the transfers capability of the account, or whether your platform can transfer funds to the account. sig { returns(String) } attr_reader :transfers + # The status of the banking capability, or whether the account can have bank accounts. sig { returns(String) } attr_reader :treasury + # The status of the treasury_evolve capability of the account. sig { returns(String) } attr_reader :treasury_evolve + # The status of the treasury_fifth_third capability of the account. sig { returns(String) } attr_reader :treasury_fifth_third + # The status of the treasury_goldman_sachs capability of the account. sig { returns(String) } attr_reader :treasury_goldman_sachs + # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. sig { returns(String) } attr_reader :twint_payments + # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. sig { returns(String) } attr_reader :us_bank_account_ach_payments + # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. sig { returns(String) } attr_reader :us_bank_transfer_payments + # The status of the Zip capability of the account, or whether the account can directly process Zip charges. sig { returns(String) } attr_reader :zip_payments end class Company < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressKana < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class AddressKanji < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class OwnershipDeclaration < Stripe::StripeObject + # The Unix timestamp marking when the beneficial owner attestation was made. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the beneficial owner attestation was made. sig { returns(T.nilable(String)) } attr_reader :ip + # The user-agent string from the browser where the beneficial owner attestation was made. sig { returns(T.nilable(String)) } attr_reader :user_agent end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # A user-displayable string describing the verification state of this document. sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end + # Attribute for field document sig { returns(Document) } attr_reader :document end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The Kana variation of the company's primary address (Japan only). sig { returns(T.nilable(AddressKana)) } attr_reader :address_kana + # The Kanji variation of the company's primary address (Japan only). sig { returns(T.nilable(AddressKanji)) } attr_reader :address_kanji + # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). sig { returns(T::Boolean) } attr_reader :directors_provided + # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. sig { returns(T::Boolean) } attr_reader :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). sig { returns(String) } attr_reader :export_license_id + # The purpose code to use for export transactions (India only). sig { returns(String) } attr_reader :export_purpose_code + # The company's legal name. sig { returns(T.nilable(String)) } attr_reader :name + # The Kana variation of the company's legal name (Japan only). sig { returns(T.nilable(String)) } attr_reader :name_kana + # The Kanji variation of the company's legal name (Japan only). sig { returns(T.nilable(String)) } attr_reader :name_kanji + # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). sig { returns(T::Boolean) } attr_reader :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. sig { returns(T.nilable(OwnershipDeclaration)) } attr_reader :ownership_declaration + # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_reader :phone + # The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. sig { returns(String) } attr_reader :structure + # Whether the company's business ID number was provided. sig { returns(T::Boolean) } attr_reader :tax_id_provided + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). sig { returns(String) } attr_reader :tax_id_registrar + # Whether the company's business VAT number was provided. sig { returns(T::Boolean) } attr_reader :vat_id_provided + # Information on the verification state of the company. sig { returns(T.nilable(Verification)) } attr_reader :verification end class Controller < Stripe::StripeObject class Application < Stripe::StripeObject + # `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. sig { returns(T::Boolean) } attr_reader :loss_liable + # `true` if the Connect application is responsible for onboarding the account. sig { returns(T::Boolean) } attr_reader :onboarding_owner + # `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. sig { returns(T::Boolean) } attr_reader :pricing_controls end class Dashboard < Stripe::StripeObject + # Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). sig { returns(String) } attr_reader :type end class Fees < Stripe::StripeObject + # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). sig { returns(String) } attr_reader :payer end class Losses < Stripe::StripeObject + # A value indicating who is liable when this account can't pay back negative balances from payments. sig { returns(String) } attr_reader :payments end class StripeDashboard < Stripe::StripeObject + # A value indicating the Stripe dashboard this account has access to independent of the Connect application. sig { returns(String) } attr_reader :type end + # Attribute for field application sig { returns(Application) } attr_reader :application + # Attribute for field dashboard sig { returns(Dashboard) } attr_reader :dashboard + # Attribute for field fees sig { returns(Fees) } attr_reader :fees + # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. sig { returns(T::Boolean) } attr_reader :is_controller + # Attribute for field losses sig { returns(Losses) } attr_reader :losses + # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. sig { returns(String) } attr_reader :requirement_collection + # Attribute for field stripe_dashboard sig { returns(StripeDashboard) } attr_reader :stripe_dashboard + # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. sig { returns(String) } attr_reader :type end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. sig { returns(T.nilable(T::Array[String])) } attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class Groups < Stripe::StripeObject + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. sig { returns(T.nilable(String)) } attr_reader :payments_pricing end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. sig { returns(T.nilable(T::Array[String])) } attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class RiskControls < Stripe::StripeObject class Charges < Stripe::StripeObject + # Whether a pause of the risk control has been requested. sig { returns(T::Boolean) } attr_reader :pause_requested end class Payouts < Stripe::StripeObject + # Whether a pause of the risk control has been requested. sig { returns(T::Boolean) } attr_reader :pause_requested end + # Attribute for field charges sig { returns(Charges) } attr_reader :charges + # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts end class Settings < Stripe::StripeObject class BacsDebitPayments < Stripe::StripeObject + # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. sig { returns(T.nilable(String)) } attr_reader :display_name + # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. sig { returns(T.nilable(String)) } attr_reader :service_user_number end class BankBcaOnboarding < Stripe::StripeObject + # Bank BCA business account holder name. sig { returns(String) } attr_reader :account_holder_name + # Bank BCA business account number. sig { returns(String) } attr_reader :business_account_number end class Branding < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :logo + # A CSS hex color value representing the primary branding color for this account sig { returns(T.nilable(String)) } attr_reader :primary_color + # A CSS hex color value representing the secondary branding color for this account sig { returns(T.nilable(String)) } attr_reader :secondary_color end class Capital < Stripe::StripeObject + # Per-currency mapping of user-selected destination accounts used to pay out loans. sig { returns(T::Hash[String, String]) } attr_reader :payout_destination + # Per-currency mapping of all destination accounts eligible to receive loan payouts. sig { returns(T::Hash[String, T::Array[String]]) } attr_reader :payout_destination_selector end class CardIssuing < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the account representative accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the account representative accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. sig { returns(String) } attr_reader :user_agent end + # Attribute for field tos_acceptance sig { returns(TosAcceptance) } attr_reader :tos_acceptance end class CardPayments < Stripe::StripeObject class DeclineOn < Stripe::StripeObject + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. sig { returns(T::Boolean) } attr_reader :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. sig { returns(T::Boolean) } attr_reader :cvc_failure end + # Attribute for field decline_on sig { returns(DeclineOn) } attr_reader :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kanji end class Dashboard < Stripe::StripeObject + # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. sig { returns(T.nilable(String)) } attr_reader :display_name + # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). sig { returns(T.nilable(String)) } attr_reader :timezone end class Invoices < Stripe::StripeObject + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :default_account_tax_ids end class Payments < Stripe::StripeObject + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_kanji + # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kanji end class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject + # The number of days charges for the account will be held before being paid out. sig { returns(Integer) } attr_reader :delay_days + # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. sig { returns(String) } attr_reader :interval + # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. sig { returns(Integer) } attr_reader :monthly_anchor + # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. sig { returns(String) } attr_reader :weekly_anchor end + # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. sig { returns(T::Boolean) } attr_reader :debit_negative_balances + # Attribute for field schedule sig { returns(Schedule) } attr_reader :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class SepaDebitPayments < Stripe::StripeObject + # SEPA creditor identifier that identifies the company making the payment. sig { returns(String) } attr_reader :creditor_id end class TaxForms < Stripe::StripeObject + # Whether the account opted out of receiving their tax forms by postal delivery. sig { returns(T::Boolean) } attr_reader :consented_to_paperless_delivery end class Treasury < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the account representative accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the account representative accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. sig { returns(String) } attr_reader :user_agent end + # Attribute for field tos_acceptance sig { returns(TosAcceptance) } attr_reader :tos_acceptance end + # Attribute for field bacs_debit_payments sig { returns(BacsDebitPayments) } attr_reader :bacs_debit_payments + # Attribute for field bank_bca_onboarding sig { returns(BankBcaOnboarding) } attr_reader :bank_bca_onboarding + # Attribute for field branding sig { returns(Branding) } attr_reader :branding + # Attribute for field capital sig { returns(Capital) } attr_reader :capital + # Attribute for field card_issuing sig { returns(CardIssuing) } attr_reader :card_issuing + # Attribute for field card_payments sig { returns(CardPayments) } attr_reader :card_payments + # Attribute for field dashboard sig { returns(Dashboard) } attr_reader :dashboard + # Attribute for field invoices sig { returns(Invoices) } attr_reader :invoices + # Attribute for field payments sig { returns(Payments) } attr_reader :payments + # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts + # Attribute for field sepa_debit_payments sig { returns(SepaDebitPayments) } attr_reader :sepa_debit_payments + # Attribute for field tax_forms sig { returns(TaxForms) } attr_reader :tax_forms + # Attribute for field treasury sig { returns(Treasury) } attr_reader :treasury end class TosAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the account representative accepted their service agreement sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the account representative accepted their service agreement sig { returns(T.nilable(String)) } attr_reader :ip + # The user's service agreement type sig { returns(String) } attr_reader :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement sig { returns(T.nilable(String)) } attr_reader :user_agent end - sig { returns(T.nilable(BusinessProfile)) } # Business information about the account. + sig { returns(T.nilable(BusinessProfile)) } attr_reader :business_profile - sig { returns(T.nilable(String)) } + # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(String)) } attr_reader :business_type - sig { returns(Capabilities) } + # Attribute for field capabilities + sig { returns(Capabilities) } attr_reader :capabilities - sig { returns(T::Boolean) } + # Whether the account can process charges. + sig { returns(T::Boolean) } attr_reader :charges_enabled - sig { returns(Company) } + # Attribute for field company + sig { returns(Company) } attr_reader :company - sig { returns(Controller) } + # Attribute for field controller + sig { returns(Controller) } attr_reader :controller - sig { returns(String) } + # The account's country. + sig { returns(String) } attr_reader :country - sig { returns(Integer) } + # Time at which the account was connected. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + sig { returns(String) } attr_reader :default_currency - sig { returns(T::Boolean) } + # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + sig { returns(T::Boolean) } attr_reader :details_submitted - sig { returns(T.nilable(String)) } + # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(Stripe::ListObject) } + # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + sig { returns(Stripe::ListObject) } attr_reader :external_accounts - sig { returns(FutureRequirements) } + # Attribute for field future_requirements + sig { returns(FutureRequirements) } attr_reader :future_requirements - sig { returns(T.nilable(Groups)) } + # The groups associated with the account. + sig { returns(T.nilable(Groups)) } attr_reader :groups - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Stripe::Person) } + # This is an object representing a person associated with a Stripe account. # # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. # # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + sig { returns(Stripe::Person) } attr_reader :individual - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Whether the funds in this account can be paid out. + sig { returns(T::Boolean) } attr_reader :payouts_enabled - sig { returns(Requirements) } + # Attribute for field requirements + sig { returns(Requirements) } attr_reader :requirements - sig { returns(RiskControls) } + # Attribute for field risk_controls + sig { returns(RiskControls) } attr_reader :risk_controls - sig { returns(T.nilable(Settings)) } + # Options for customizing how the account functions within Stripe. + sig { returns(T.nilable(Settings)) } attr_reader :settings - sig { returns(TosAcceptance) } + # Attribute for field tos_acceptance + sig { returns(TosAcceptance) } attr_reader :tos_acceptance - sig { returns(String) } + # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + sig { returns(String) } attr_reader :type - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_link.rbi b/rbi/stripe/resources/account_link.rbi index 63551fb51..219338709 100644 --- a/rbi/stripe/resources/account_link.rbi +++ b/rbi/stripe/resources/account_link.rbi @@ -8,17 +8,20 @@ module Stripe # # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) class AccountLink < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created + # The timestamp at which this account link will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The URL for the account link. + sig { returns(String) } attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_notice.rbi b/rbi/stripe/resources/account_notice.rbi index 430ba2ecb..6b418ad8d 100644 --- a/rbi/stripe/resources/account_notice.rbi +++ b/rbi/stripe/resources/account_notice.rbi @@ -8,50 +8,65 @@ module Stripe # See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts. class AccountNotice < APIResource class Email < Stripe::StripeObject + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. sig { returns(String) } attr_reader :plain_text + # Email address of the recipient. sig { returns(String) } attr_reader :recipient + # Subject of the email. sig { returns(String) } attr_reader :subject end class LinkedObjects < Stripe::StripeObject + # Associated [Capability](https://stripe.com/docs/api/capabilities) sig { returns(T.nilable(String)) } attr_reader :capability + # Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) sig { returns(T.nilable(String)) } attr_reader :issuing_credit_underwriting_record + # Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) sig { returns(T.nilable(String)) } attr_reader :issuing_dispute end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } + # When present, the deadline for sending the notice to meet the relevant regulations. + sig { returns(T.nilable(Integer)) } attr_reader :deadline - sig { returns(T.nilable(Email)) } + # Information about the email when sent. + sig { returns(T.nilable(Email)) } attr_reader :email - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LinkedObjects)) } + # Information about objects related to the notice. + sig { returns(T.nilable(LinkedObjects)) } attr_reader :linked_objects - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. + sig { returns(String) } attr_reader :reason - sig { returns(T.nilable(Integer)) } + # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. + sig { returns(T.nilable(Integer)) } attr_reader :sent_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi index 8010a1450..08c4592e2 100644 --- a/rbi/stripe/resources/account_session.rbi +++ b/rbi/stripe/resources/account_session.rbi @@ -14,207 +14,278 @@ module Stripe class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :standard_payouts end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancing < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancingApplication < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancingPromotion < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Documents < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject + # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Payments < Stripe::StripeObject class Features < Stripe::StripeObject + # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :standard_payouts end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class PayoutsList < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class TaxRegistrations < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class TaxSettings < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end + # Attribute for field account_management sig { returns(AccountManagement) } attr_reader :account_management + # Attribute for field account_onboarding sig { returns(AccountOnboarding) } attr_reader :account_onboarding + # Attribute for field balances sig { returns(Balances) } attr_reader :balances + # Attribute for field capital_financing sig { returns(T.nilable(CapitalFinancing)) } attr_reader :capital_financing + # Attribute for field capital_financing_application sig { returns(T.nilable(CapitalFinancingApplication)) } attr_reader :capital_financing_application + # Attribute for field capital_financing_promotion sig { returns(T.nilable(CapitalFinancingPromotion)) } attr_reader :capital_financing_promotion + # Attribute for field documents sig { returns(Documents) } attr_reader :documents + # Attribute for field notification_banner sig { returns(NotificationBanner) } attr_reader :notification_banner + # Attribute for field payment_details sig { returns(PaymentDetails) } attr_reader :payment_details + # Attribute for field payments sig { returns(Payments) } attr_reader :payments + # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts + # Attribute for field payouts_list sig { returns(PayoutsList) } attr_reader :payouts_list + # Attribute for field tax_registrations sig { returns(TaxRegistrations) } attr_reader :tax_registrations + # Attribute for field tax_settings sig { returns(TaxSettings) } attr_reader :tax_settings end - sig { returns(String) } # The ID of the account the AccountSession was created for - attr_reader :account sig { returns(String) } + attr_reader :account + # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. # # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + sig { returns(String) } attr_reader :client_secret - sig { returns(Components) } + # Attribute for field components + sig { returns(Components) } attr_reader :components - sig { returns(Integer) } + # The timestamp at which this AccountSession will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/apple_pay_domain.rbi b/rbi/stripe/resources/apple_pay_domain.rbi index ccead41a3..3d0a10822 100644 --- a/rbi/stripe/resources/apple_pay_domain.rbi +++ b/rbi/stripe/resources/apple_pay_domain.rbi @@ -5,23 +5,28 @@ module Stripe # Domains registered for Apple Pay on the Web class ApplePayDomain < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Attribute for field domain_name - attr_reader :domain_name sig { returns(String) } + attr_reader :domain_name + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/application.rbi b/rbi/stripe/resources/application.rbi index 8db61fc11..45d8431f8 100644 --- a/rbi/stripe/resources/application.rbi +++ b/rbi/stripe/resources/application.rbi @@ -4,17 +4,20 @@ # typed: true module Stripe class Application < APIResource - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The name of the application. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee.rbi b/rbi/stripe/resources/application_fee.rbi index f12fa1dcd..c1a4414d9 100644 --- a/rbi/stripe/resources/application_fee.rbi +++ b/rbi/stripe/resources/application_fee.rbi @@ -5,57 +5,74 @@ module Stripe class ApplicationFee < APIResource class FeeSource < Stripe::StripeObject + # Charge ID that created this application fee. sig { returns(String) } attr_reader :charge + # Payout ID that created this application fee. sig { returns(String) } attr_reader :payout + # Type of object that created the application fee, either `charge` or `payout`. sig { returns(String) } attr_reader :type end - sig { returns(T.any(String, Stripe::Account)) } # ID of the Stripe account this fee was taken from. + sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - sig { returns(Integer) } + # Amount earned, in cents (or local equivalent). - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + sig { returns(Integer) } attr_reader :amount_refunded - sig { returns(T.any(String, Stripe::Application)) } + # ID of the Connect application that earned the fee. + sig { returns(T.any(String, Stripe::Application)) } attr_reader :application - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge that the application fee was taken from. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(FeeSource)) } + # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + sig { returns(T.nilable(FeeSource)) } attr_reader :fee_source - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :originating_transaction - sig { returns(T::Boolean) } + # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + sig { returns(T::Boolean) } attr_reader :refunded - sig { returns(Stripe::ListObject) } + # A list of refunds that have been applied to the fee. + sig { returns(Stripe::ListObject) } attr_reader :refunds end end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee_refund.rbi b/rbi/stripe/resources/application_fee_refund.rbi index 571351dfe..f39f239a6 100644 --- a/rbi/stripe/resources/application_fee_refund.rbi +++ b/rbi/stripe/resources/application_fee_refund.rbi @@ -9,29 +9,36 @@ module Stripe # # Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) class ApplicationFeeRefund < APIResource - sig { returns(Integer) } # Amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::ApplicationFee)) } + # ID of the application fee that was refunded. + sig { returns(T.any(String, Stripe::ApplicationFee)) } attr_reader :fee - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/apps/secret.rbi b/rbi/stripe/resources/apps/secret.rbi index 62bb75da3..ba2df56e8 100644 --- a/rbi/stripe/resources/apps/secret.rbi +++ b/rbi/stripe/resources/apps/secret.rbi @@ -15,37 +15,47 @@ module Stripe # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) class Secret < APIResource class Scope < Stripe::StripeObject + # The secret scope type. sig { returns(String) } attr_reader :type + # The user ID, if type is set to "user" sig { returns(String) } attr_reader :user end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Boolean) } + # If true, indicates that this secret has been deleted + sig { returns(T::Boolean) } attr_reader :deleted - sig { returns(T.nilable(Integer)) } + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # A name for the secret that's unique within the scope. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The plaintext secret value to be stored. + sig { returns(T.nilable(String)) } attr_reader :payload - sig { returns(Scope) } + # Attribute for field scope + sig { returns(Scope) } attr_reader :scope end end diff --git a/rbi/stripe/resources/balance.rbi b/rbi/stripe/resources/balance.rbi index aa4dfd063..bf1a9390d 100644 --- a/rbi/stripe/resources/balance.rbi +++ b/rbi/stripe/resources/balance.rbi @@ -17,126 +17,170 @@ module Stripe class Balance < SingletonAPIResource class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class ConnectReserved < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class InstantAvailable < Stripe::StripeObject class NetAvailable < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Net balance amount, subtracting fees from platform-set pricing. sig { returns(Integer) } attr_reader :amount + # ID of the external account for this net balance (not expandable). sig { returns(String) } attr_reader :destination + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Breakdown of balance by destination. sig { returns(T::Array[NetAvailable]) } attr_reader :net_available + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class Issuing < Stripe::StripeObject class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end + # Funds that are available for use. sig { returns(T::Array[Available]) } attr_reader :available end class Pending < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end - sig { returns(T::Array[Available]) } # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + sig { returns(T::Array[Available]) } attr_reader :available - sig { returns(T::Array[ConnectReserved]) } + # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + sig { returns(T::Array[ConnectReserved]) } attr_reader :connect_reserved - sig { returns(T::Array[InstantAvailable]) } + # Funds that you can pay out using Instant Payouts. + sig { returns(T::Array[InstantAvailable]) } attr_reader :instant_available - sig { returns(Issuing) } + # Attribute for field issuing + sig { returns(Issuing) } attr_reader :issuing - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Pending]) } + # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + sig { returns(T::Array[Pending]) } attr_reader :pending end end \ No newline at end of file diff --git a/rbi/stripe/resources/balance_transaction.rbi b/rbi/stripe/resources/balance_transaction.rbi index 8c37fce23..13894f289 100644 --- a/rbi/stripe/resources/balance_transaction.rbi +++ b/rbi/stripe/resources/balance_transaction.rbi @@ -9,63 +9,82 @@ module Stripe # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) class BalanceTransaction < APIResource class FeeDetail < Stripe::StripeObject + # Amount of the fee, in cents. sig { returns(Integer) } attr_reader :amount + # ID of the Connect application that earned the fee. sig { returns(T.nilable(String)) } attr_reader :application + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # The date that the transaction's net funds become available in the Stripe balance. - attr_reader :available_on sig { returns(Integer) } + attr_reader :available_on + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Float)) } + # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + sig { returns(T.nilable(Float)) } attr_reader :exchange_rate - sig { returns(Integer) } + # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + sig { returns(Integer) } attr_reader :fee - sig { returns(T::Array[FeeDetail]) } + # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + sig { returns(T::Array[FeeDetail]) } attr_reader :fee_details - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Integer) } + # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + sig { returns(Integer) } attr_reader :net - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + sig { returns(String) } attr_reader :reporting_category + + # This transaction relates to the Stripe object. sig { returns(T.nilable(T.any(String, T.any(Stripe::ApplicationFee, Stripe::Charge, Stripe::ConnectCollectionTransfer, Stripe::CustomerCashBalanceTransaction, Stripe::Dispute, Stripe::ApplicationFeeRefund, Stripe::Issuing::Authorization, Stripe::Issuing::Dispute, Stripe::Issuing::Transaction, Stripe::Payout, Stripe::Refund, Stripe::ReserveTransaction, Stripe::TaxDeductedAtSource, Stripe::Topup, Stripe::Transfer, Stripe::Reversal)))) } - # This transaction relates to the Stripe object. attr_reader :source - sig { returns(String) } + # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. - attr_reader :status sig { returns(String) } + attr_reader :status + # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/bank_account.rbi b/rbi/stripe/resources/bank_account.rbi index f9fe18ff0..2bab2b54a 100644 --- a/rbi/stripe/resources/bank_account.rbi +++ b/rbi/stripe/resources/bank_account.rbi @@ -13,101 +13,134 @@ module Stripe class BankAccount < APIResource class FutureRequirements < Stripe::StripeObject class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The ID of the account that the bank account is associated with. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account - sig { returns(T.nilable(String)) } + # The name of the person or business that owns the bank account. - attr_reader :account_holder_name sig { returns(T.nilable(String)) } + attr_reader :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. - attr_reader :account_holder_type sig { returns(T.nilable(String)) } + attr_reader :account_holder_type + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + sig { returns(T.nilable(String)) } attr_reader :account_type - sig { returns(T.nilable(T::Array[String])) } + # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + sig { returns(T.nilable(T::Array[String])) } attr_reader :available_payout_methods - sig { returns(T.nilable(String)) } + # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + sig { returns(T.nilable(String)) } attr_reader :bank_name - sig { returns(String) } + # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country sig { returns(String) } + attr_reader :country + # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer that the bank account is associated with. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(T::Boolean)) } + # Whether this bank account is the default external account for its currency. + sig { returns(T.nilable(T::Boolean)) } attr_reader :default_for_currency - sig { returns(T.nilable(String)) } + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + sig { returns(T.nilable(String)) } attr_reader :fingerprint - sig { returns(T.nilable(FutureRequirements)) } + # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + sig { returns(T.nilable(FutureRequirements)) } attr_reader :future_requirements - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The last four digits of the bank account number. + sig { returns(String) } attr_reader :last4 - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Requirements)) } + # Information about the requirements for the bank account, including what information needs to be collected. + sig { returns(T.nilable(Requirements)) } attr_reader :requirements - sig { returns(T.nilable(String)) } + # The routing transit number for the bank account. + sig { returns(T.nilable(String)) } attr_reader :routing_number - sig { returns(String) } + # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. # # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + sig { returns(String) } attr_reader :status - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi index a7e474c41..2d57f7eb5 100644 --- a/rbi/stripe/resources/billing/alert.rbi +++ b/rbi/stripe/resources/billing/alert.rbi @@ -8,40 +8,52 @@ module Stripe class Alert < APIResource class UsageThreshold < Stripe::StripeObject class Filter < Stripe::StripeObject + # Limit the scope of the alert to this customer ID sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer + # Attribute for field type sig { returns(String) } attr_reader :type end + # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. sig { returns(T.nilable(T::Array[Filter])) } attr_reader :filters + # The value at which this alert will trigger. sig { returns(Integer) } attr_reader :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. sig { returns(T.any(String, Stripe::Billing::Meter)) } attr_reader :meter + # Defines how the alert will behave. sig { returns(String) } attr_reader :recurrence end - sig { returns(String) } # Defines the type of the alert. - attr_reader :alert_type sig { returns(String) } + attr_reader :alert_type + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # Status of the alert. This can be active, inactive or archived. + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(String) } + # Title of the alert. + sig { returns(String) } attr_reader :title - sig { returns(T.nilable(UsageThreshold)) } + # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + sig { returns(T.nilable(UsageThreshold)) } attr_reader :usage_threshold end end diff --git a/rbi/stripe/resources/billing/alert_triggered.rbi b/rbi/stripe/resources/billing/alert_triggered.rbi index 0dd1d6dd6..7b7001aeb 100644 --- a/rbi/stripe/resources/billing/alert_triggered.rbi +++ b/rbi/stripe/resources/billing/alert_triggered.rbi @@ -5,23 +5,28 @@ module Stripe module Billing class AlertTriggered < APIResource - sig { returns(Stripe::Billing::Alert) } # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + sig { returns(Stripe::Billing::Alert) } attr_reader :alert - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # ID of customer for which the alert triggered + sig { returns(String) } attr_reader :customer - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # The value triggering the alert + sig { returns(Integer) } attr_reader :value end end diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi index 8d4cddaeb..aa725e4b7 100644 --- a/rbi/stripe/resources/billing/credit_balance_summary.rbi +++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi @@ -9,44 +9,57 @@ module Stripe class Balance < Stripe::StripeObject class AvailableBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class LedgerBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end + # Attribute for field available_balance sig { returns(AvailableBalance) } attr_reader :available_balance + # Attribute for field ledger_balance sig { returns(LedgerBalance) } attr_reader :ledger_balance end - sig { returns(T::Array[Balance]) } # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + sig { returns(T::Array[Balance]) } attr_reader :balances - sig { returns(T.any(String, Stripe::Customer)) } + # The customer the balance is for. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi index efe2fe15b..9ba46310a 100644 --- a/rbi/stripe/resources/billing/credit_balance_transaction.rbi +++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi @@ -9,76 +9,100 @@ module Stripe class Credit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end + # Attribute for field amount sig { returns(Amount) } attr_reader :amount + # The type of credit transaction. sig { returns(String) } attr_reader :type end class Debit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class CreditsApplied < Stripe::StripeObject + # The invoice to which the billing credits were applied. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The invoice line item to which the billing credits were applied. sig { returns(String) } attr_reader :invoice_line_item end + # Attribute for field amount sig { returns(Amount) } attr_reader :amount + # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. sig { returns(T.nilable(CreditsApplied)) } attr_reader :credits_applied + # The type of debit transaction. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Credit)) } + # Credit details for this credit balance transaction. Only present if type is `credit`. + sig { returns(T.nilable(Credit)) } attr_reader :credit - sig { returns(T.any(String, Stripe::Billing::CreditGrant)) } + # The credit grant associated with this credit balance transaction. + sig { returns(T.any(String, Stripe::Billing::CreditGrant)) } attr_reader :credit_grant - sig { returns(T.nilable(Debit)) } + # Debit details for this credit balance transaction. Only present if type is `debit`. + sig { returns(T.nilable(Debit)) } attr_reader :debit - sig { returns(Integer) } + # The effective time of this credit balance transaction. + sig { returns(Integer) } attr_reader :effective_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this credit balance transaction belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T.nilable(String)) } + # The type of credit balance transaction (credit or debit). + sig { returns(T.nilable(String)) } attr_reader :type end end diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index 3d9a9184e..75b207599 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -10,68 +10,88 @@ module Stripe class CreditGrant < APIResource class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class ApplicabilityConfig < Stripe::StripeObject class Scope < Stripe::StripeObject + # The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. sig { returns(String) } attr_reader :price_type end + # Attribute for field scope sig { returns(Scope) } attr_reader :scope end - sig { returns(Amount) } # Attribute for field amount + sig { returns(Amount) } attr_reader :amount - sig { returns(ApplicabilityConfig) } + # Attribute for field applicability_config + sig { returns(ApplicabilityConfig) } attr_reader :applicability_config - sig { returns(String) } + # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + sig { returns(String) } attr_reader :category - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer receiving the billing credits. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(Integer)) } + # The time when the billing credits become effective—when they're eligible for use. - attr_reader :effective_at sig { returns(T.nilable(Integer)) } + attr_reader :effective_at + # The time when the billing credits expire. If not present, the billing credits don't expire. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # A descriptive name shown in dashboard. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this credit grant belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated - sig { returns(T.nilable(Integer)) } + # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + sig { returns(T.nilable(Integer)) } attr_reader :voided_at end end diff --git a/rbi/stripe/resources/billing/meter.rbi b/rbi/stripe/resources/billing/meter.rbi index 713256681..1541e2fef 100644 --- a/rbi/stripe/resources/billing/meter.rbi +++ b/rbi/stripe/resources/billing/meter.rbi @@ -9,61 +9,78 @@ module Stripe # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) class Meter < APIResource class CustomerMapping < Stripe::StripeObject + # The key in the meter event payload to use for mapping the event to a customer. sig { returns(String) } attr_reader :event_payload_key + # The method for mapping a meter event to a customer. sig { returns(String) } attr_reader :type end class DefaultAggregation < Stripe::StripeObject + # Specifies how events are aggregated. sig { returns(String) } attr_reader :formula end class StatusTransitions < Stripe::StripeObject + # The time the meter was deactivated, if any. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :deactivated_at end class ValueSettings < Stripe::StripeObject + # The key in the meter event payload to use as the value for this meter. sig { returns(String) } attr_reader :event_payload_key end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(CustomerMapping) } + # Attribute for field customer_mapping + sig { returns(CustomerMapping) } attr_reader :customer_mapping - sig { returns(DefaultAggregation) } + # Attribute for field default_aggregation + sig { returns(DefaultAggregation) } attr_reader :default_aggregation - sig { returns(String) } + # The meter's name. - attr_reader :display_name sig { returns(String) } + attr_reader :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + sig { returns(String) } attr_reader :event_name - sig { returns(T.nilable(String)) } + # The time window to pre-aggregate meter events for, if any. + sig { returns(T.nilable(String)) } attr_reader :event_time_window - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The meter's status. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated - sig { returns(ValueSettings) } + # Attribute for field value_settings + sig { returns(ValueSettings) } attr_reader :value_settings end end diff --git a/rbi/stripe/resources/billing/meter_error_report.rbi b/rbi/stripe/resources/billing/meter_error_report.rbi index 65981e0b1..e20386130 100644 --- a/rbi/stripe/resources/billing/meter_error_report.rbi +++ b/rbi/stripe/resources/billing/meter_error_report.rbi @@ -9,52 +9,68 @@ module Stripe class ErrorType < Stripe::StripeObject class SampleError < Stripe::StripeObject class ApiRequest < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # idempotency_key of the request sig { returns(String) } attr_reader :idempotency_key end + # Attribute for field api_request sig { returns(T.nilable(ApiRequest)) } attr_reader :api_request + # message of the error sig { returns(String) } attr_reader :error_message end + # Attribute for field sample_errors sig { returns(T::Array[SampleError]) } attr_reader :sample_errors end + # The number of errors generated sig { returns(Integer) } attr_reader :error_count + # More information about errors sig { returns(T::Array[ErrorType]) } attr_reader :error_types end class RelatedObject < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The type of meter error related object. Should be 'meter' sig { returns(String) } attr_reader :object + # The url of the meter object sig { returns(String) } attr_reader :url end - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Reason) } + # Attribute for field reason + sig { returns(Reason) } attr_reader :reason - sig { returns(T.nilable(RelatedObject)) } + # The related objects about the error + sig { returns(T.nilable(RelatedObject)) } attr_reader :related_object - sig { returns(String) } + # Summary of invalid events + sig { returns(String) } attr_reader :summary - sig { returns(Integer) } + # Time when validation ended. Measured in seconds since the Unix epoch - attr_reader :validation_end sig { returns(Integer) } + attr_reader :validation_end + # Time when validation started. Measured in seconds since the Unix epoch + sig { returns(Integer) } attr_reader :validation_start end end diff --git a/rbi/stripe/resources/billing/meter_event.rbi b/rbi/stripe/resources/billing/meter_event.rbi index de9b92040..cf08b8ee4 100644 --- a/rbi/stripe/resources/billing/meter_event.rbi +++ b/rbi/stripe/resources/billing/meter_event.rbi @@ -7,26 +7,32 @@ module Stripe # A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. # Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. class MeterEvent < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. - attr_reader :event_name sig { returns(String) } + attr_reader :event_name + # A unique identifier for the event. + sig { returns(String) } attr_reader :identifier - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, String]) } + # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } attr_reader :payload - sig { returns(Integer) } + # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :timestamp end end diff --git a/rbi/stripe/resources/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/billing/meter_event_adjustment.rbi index 3b4ecfefd..0d161a986 100644 --- a/rbi/stripe/resources/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/billing/meter_event_adjustment.rbi @@ -7,26 +7,32 @@ module Stripe # A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. class MeterEventAdjustment < APIResource class Cancel < Stripe::StripeObject + # Unique identifier for the event. sig { returns(T.nilable(String)) } attr_reader :identifier end - sig { returns(T.nilable(Cancel)) } # Specifies which event to cancel. + sig { returns(T.nilable(Cancel)) } attr_reader :cancel - sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } attr_reader :event_name - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The meter event adjustment's status. - attr_reader :status sig { returns(String) } + attr_reader :status + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/billing/meter_event_summary.rbi b/rbi/stripe/resources/billing/meter_event_summary.rbi index c03a0dcf5..da5261089 100644 --- a/rbi/stripe/resources/billing/meter_event_summary.rbi +++ b/rbi/stripe/resources/billing/meter_event_summary.rbi @@ -7,26 +7,32 @@ module Stripe # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much # usage was accrued by a customer for that period. class MeterEventSummary < APIResource - sig { returns(Float) } # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + sig { returns(Float) } attr_reader :aggregated_value - sig { returns(Integer) } + # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + sig { returns(Integer) } attr_reader :end_time - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The meter associated with this event summary. - attr_reader :meter sig { returns(String) } + attr_reader :meter + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + sig { returns(Integer) } attr_reader :start_time end end diff --git a/rbi/stripe/resources/billing_portal/configuration.rbi b/rbi/stripe/resources/billing_portal/configuration.rbi index 889468ff4..fe59b6d41 100644 --- a/rbi/stripe/resources/billing_portal/configuration.rbi +++ b/rbi/stripe/resources/billing_portal/configuration.rbi @@ -7,125 +7,168 @@ module Stripe # A portal configuration describes the functionality and behavior of a portal session. class Configuration < APIResource class BusinessProfile < Stripe::StripeObject + # The messaging shown to customers in the portal. sig { returns(T.nilable(String)) } attr_reader :headline + # A link to the business’s publicly available privacy policy. sig { returns(T.nilable(String)) } attr_reader :privacy_policy_url + # A link to the business’s publicly available terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service_url end class Features < Stripe::StripeObject class CustomerUpdate < Stripe::StripeObject + # The types of customer updates that are supported. When empty, customers are not updateable. sig { returns(T::Array[String]) } attr_reader :allowed_updates + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class InvoiceHistory < Stripe::StripeObject + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class PaymentMethodUpdate < Stripe::StripeObject + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class SubscriptionCancel < Stripe::StripeObject class CancellationReason < Stripe::StripeObject + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Which cancellation reasons will be given as options to the customer. sig { returns(T::Array[String]) } attr_reader :options end + # Attribute for field cancellation_reason sig { returns(CancellationReason) } attr_reader :cancellation_reason + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. sig { returns(String) } attr_reader :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. sig { returns(String) } attr_reader :proration_behavior end class SubscriptionUpdate < Stripe::StripeObject class Product < Stripe::StripeObject + # The list of price IDs which, when subscribed to, a subscription can be updated. sig { returns(T::Array[String]) } attr_reader :prices + # The product ID. sig { returns(String) } attr_reader :product end class ScheduleAtPeriodEnd < Stripe::StripeObject class Condition < Stripe::StripeObject + # The type of condition. sig { returns(String) } attr_reader :type end + # List of conditions. When any condition is true, an update will be scheduled at the end of the current period. sig { returns(T::Array[Condition]) } attr_reader :conditions end + # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. sig { returns(T::Array[String]) } attr_reader :default_allowed_updates + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # The list of up to 10 products that support subscription updates. sig { returns(T.nilable(T::Array[Product])) } attr_reader :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. sig { returns(String) } attr_reader :proration_behavior + # Attribute for field schedule_at_period_end sig { returns(ScheduleAtPeriodEnd) } attr_reader :schedule_at_period_end end + # Attribute for field customer_update sig { returns(CustomerUpdate) } attr_reader :customer_update + # Attribute for field invoice_history sig { returns(InvoiceHistory) } attr_reader :invoice_history + # Attribute for field payment_method_update sig { returns(PaymentMethodUpdate) } attr_reader :payment_method_update + # Attribute for field subscription_cancel sig { returns(SubscriptionCancel) } attr_reader :subscription_cancel + # Attribute for field subscription_update sig { returns(SubscriptionUpdate) } attr_reader :subscription_update end class LoginPage < Stripe::StripeObject + # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + # + # If `false`, the previously generated `url`, if any, will be deactivated. sig { returns(T::Boolean) } attr_reader :enabled + # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. sig { returns(T.nilable(String)) } attr_reader :url end - sig { returns(T::Boolean) } # Whether the configuration is active and can be used to create portal sessions. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the configuration. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(BusinessProfile) } + # Attribute for field business_profile + sig { returns(BusinessProfile) } attr_reader :business_profile - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + sig { returns(T.nilable(String)) } attr_reader :default_return_url - sig { returns(Features) } + # Attribute for field features + sig { returns(Features) } attr_reader :features - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. - attr_reader :is_default sig { returns(T::Boolean) } + attr_reader :is_default + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(LoginPage) } + # Attribute for field login_page + sig { returns(LoginPage) } attr_reader :login_page - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated end end diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi index 7cda5592d..814823afa 100644 --- a/rbi/stripe/resources/billing_portal/session.rbi +++ b/rbi/stripe/resources/billing_portal/session.rbi @@ -22,105 +22,139 @@ module Stripe class Flow < Stripe::StripeObject class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # A custom message to display to the customer after the flow is completed. sig { returns(T.nilable(String)) } attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the flow is completed. sig { returns(String) } attr_reader :return_url end + # Configuration when `after_completion.type=hosted_confirmation`. sig { returns(T.nilable(HostedConfirmation)) } attr_reader :hosted_confirmation + # Configuration when `after_completion.type=redirect`. sig { returns(T.nilable(Redirect)) } attr_reader :redirect + # The specified type of behavior after the flow is completed. sig { returns(String) } attr_reader :type end class SubscriptionCancel < Stripe::StripeObject class Retention < Stripe::StripeObject class CouponOffer < Stripe::StripeObject + # The ID of the coupon to be offered. sig { returns(String) } attr_reader :coupon end + # Configuration when `retention.type=coupon_offer`. sig { returns(T.nilable(CouponOffer)) } attr_reader :coupon_offer + # Type of retention strategy that will be used. sig { returns(String) } attr_reader :type end + # Specify a retention strategy to be used in the cancellation flow. sig { returns(T.nilable(Retention)) } attr_reader :retention + # The ID of the subscription to be canceled. sig { returns(String) } attr_reader :subscription end class SubscriptionUpdate < Stripe::StripeObject + # The ID of the subscription to be updated. sig { returns(String) } attr_reader :subscription end class SubscriptionUpdateConfirm < Stripe::StripeObject class Discount < Stripe::StripeObject + # The ID of the coupon to apply to this subscription update. sig { returns(T.nilable(String)) } attr_reader :coupon + # The ID of a promotion code to apply to this subscription update. sig { returns(T.nilable(String)) } attr_reader :promotion_code end class Item < Stripe::StripeObject + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. sig { returns(T.nilable(String)) } attr_reader :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). sig { returns(T.nilable(String)) } attr_reader :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. sig { returns(Integer) } attr_reader :quantity end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. sig { returns(T.nilable(T::Array[Discount])) } attr_reader :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. sig { returns(T::Array[Item]) } attr_reader :items + # The ID of the subscription to be updated. sig { returns(String) } attr_reader :subscription end + # Attribute for field after_completion sig { returns(AfterCompletion) } attr_reader :after_completion + # Configuration when `flow.type=subscription_cancel`. sig { returns(T.nilable(SubscriptionCancel)) } attr_reader :subscription_cancel + # Configuration when `flow.type=subscription_update`. sig { returns(T.nilable(SubscriptionUpdate)) } attr_reader :subscription_update + # Configuration when `flow.type=subscription_update_confirm`. sig { returns(T.nilable(SubscriptionUpdateConfirm)) } attr_reader :subscription_update_confirm + # Type of flow that the customer will go through. sig { returns(String) } attr_reader :type end - sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) } # The configuration used by this session, describing the features available. + sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) } attr_reader :configuration - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The ID of the customer for this session. + sig { returns(String) } attr_reader :customer - sig { returns(T.nilable(Flow)) } + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + sig { returns(T.nilable(Flow)) } attr_reader :flow - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + sig { returns(T.nilable(String)) } attr_reader :locale - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. - attr_reader :on_behalf_of sig { returns(T.nilable(String)) } + attr_reader :on_behalf_of + # The URL to redirect customers to when they click on the portal's link to return to your website. + sig { returns(T.nilable(String)) } attr_reader :return_url - sig { returns(String) } + # The short-lived URL of the session that gives customers access to the customer portal. + sig { returns(String) } attr_reader :url end end diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi index 3ad23eb66..c9927b744 100644 --- a/rbi/stripe/resources/capability.rbi +++ b/rbi/stripe/resources/capability.rbi @@ -9,91 +9,124 @@ module Stripe class Capability < APIResource class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. sig { returns(T::Array[String]) } attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. sig { returns(T::Array[String]) } attr_reader :currently_due + # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end - sig { returns(T.any(String, Stripe::Account)) } # The account for which the capability enables functionality. + sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - sig { returns(FutureRequirements) } + # Attribute for field future_requirements + sig { returns(FutureRequirements) } attr_reader :future_requirements - sig { returns(String) } + # The identifier for the capability. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Whether the capability has been requested. + sig { returns(T::Boolean) } attr_reader :requested - sig { returns(T.nilable(Integer)) } + # Time at which the capability was requested. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :requested_at - sig { returns(Requirements) } + # Attribute for field requirements + sig { returns(Requirements) } attr_reader :requirements - sig { returns(String) } + # The status of the capability. + sig { returns(String) } attr_reader :status end end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_offer.rbi b/rbi/stripe/resources/capital/financing_offer.rbi index b38835e6a..632e79db3 100644 --- a/rbi/stripe/resources/capital/financing_offer.rbi +++ b/rbi/stripe/resources/capital/financing_offer.rbi @@ -8,83 +8,113 @@ module Stripe # Stripe Capital to a Connect subaccount. class FinancingOffer < APIResource class AcceptedTerms < Stripe::StripeObject + # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount + # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency + # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount amount on remaining premium for the existing loan at payout time. sig { returns(T.nilable(Integer)) } attr_reader :previous_financing_fee_discount_amount + # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject + # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount + # Describes the type of user the offer is being extended to. sig { returns(String) } attr_reader :campaign_type + # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency + # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` + # is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate + # and the remaining fee. sig { returns(T.nilable(Float)) } attr_reader :previous_financing_fee_discount_rate + # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end - sig { returns(AcceptedTerms) } # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # the terms accepted by the Connected account, which may differ from those # offered. + sig { returns(AcceptedTerms) } attr_reader :accepted_terms - sig { returns(String) } + # The ID of the merchant associated with this financing object. + sig { returns(String) } attr_reader :account - sig { returns(Integer) } + # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. - attr_reader :charged_off_at sig { returns(Integer) } + attr_reader :charged_off_at + # Time at which the offer was created. Given in seconds since unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Float) } + # Time at which the offer expires. Given in seconds since unix epoch. + sig { returns(Float) } attr_reader :expires_after - sig { returns(String) } + # The type of financing being offered. - attr_reader :financing_type sig { returns(String) } + attr_reader :financing_type + # A unique identifier for the financing object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The object type: financing_offer. + sig { returns(String) } attr_reader :object - sig { returns(OfferedTerms) } + # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # both the terms offered to the Connected account. + sig { returns(OfferedTerms) } attr_reader :offered_terms - sig { returns(String) } + # Financing product identifier. - attr_reader :product_type sig { returns(String) } + attr_reader :product_type + # The ID of the financing offer that replaced this offer. - attr_reader :replacement sig { returns(String) } + attr_reader :replacement + # The ID of the financing offer that this offer is a replacement for. - attr_reader :replacement_for sig { returns(String) } + attr_reader :replacement_for + # The current status of the offer. - attr_reader :status sig { returns(String) } + attr_reader :status + # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/capital/financing_summary.rbi b/rbi/stripe/resources/capital/financing_summary.rbi index 82b34f0c4..e4bf1301c 100644 --- a/rbi/stripe/resources/capital/financing_summary.rbi +++ b/rbi/stripe/resources/capital/financing_summary.rbi @@ -9,45 +9,61 @@ module Stripe class FinancingSummary < SingletonAPIResource class Details < Stripe::StripeObject class CurrentRepaymentInterval < Stripe::StripeObject + # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. + # Given in seconds since unix epoch. sig { returns(Integer) } attr_reader :due_at + # The amount that has already been paid in the current repayment interval. sig { returns(T.nilable(Integer)) } attr_reader :paid_amount + # The amount that is yet to be paid in the current repayment interval. sig { returns(Integer) } attr_reader :remaining_amount end + # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount + # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :advance_paid_out_at + # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency + # The chronologically current repayment interval for the financing offer. sig { returns(T.nilable(CurrentRepaymentInterval)) } attr_reader :current_repayment_interval + # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount + # The amount the Connected account has paid toward the financing debt so far. sig { returns(Integer) } attr_reader :paid_amount + # The balance remaining to be paid on the financing, in minor units. sig { returns(Integer) } attr_reader :remaining_amount + # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :repayments_begin_at + # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end - sig { returns(T.nilable(Details)) } # Additional information about the financing summary. Describes currency, advance amount, # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, # repayment start date, and advance payout date. + sig { returns(T.nilable(Details)) } attr_reader :details - sig { returns(T.nilable(String)) } + # The Financing Offer ID this Financing Summary corresponds to + sig { returns(T.nilable(String)) } attr_reader :financing_offer - sig { returns(String) } + # The object type: financing_summary + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. + sig { returns(T.nilable(String)) } attr_reader :status end end diff --git a/rbi/stripe/resources/capital/financing_transaction.rbi b/rbi/stripe/resources/capital/financing_transaction.rbi index 23328bc6a..befe2657d 100644 --- a/rbi/stripe/resources/capital/financing_transaction.rbi +++ b/rbi/stripe/resources/capital/financing_transaction.rbi @@ -8,59 +8,79 @@ module Stripe class FinancingTransaction < APIResource class Details < Stripe::StripeObject class Transaction < Stripe::StripeObject + # The linked payment ID. sig { returns(String) } attr_reader :charge + # The linked Treasury Financing Transaction ID. sig { returns(String) } attr_reader :treasury_transaction end + # The advance amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :advance_amount + # The currency of the financing transaction. sig { returns(String) } attr_reader :currency + # The fee amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :fee_amount + # The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. sig { returns(String) } attr_reader :linked_payment + # The reason for the financing transaction (if applicable). sig { returns(String) } attr_reader :reason + # The reversed transaction. This field only applies to financing + # transactions of type `reversal`. sig { returns(String) } attr_reader :reversed_transaction + # The advance and fee amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :total_amount + # This is an object representing a linked transaction on a Capital Financing Transaction. sig { returns(Transaction) } attr_reader :transaction end - sig { returns(String) } # The ID of the merchant associated with this financing transaction. + sig { returns(String) } attr_reader :account - sig { returns(Integer) } + # Time at which the financing transaction was created. Given in seconds since unix epoch. + sig { returns(Integer) } attr_reader :created_at - sig { returns(Details) } + # This is an object representing a transaction on a Capital financing offer. + sig { returns(Details) } attr_reader :details - sig { returns(T.nilable(String)) } + # The Capital financing offer for this financing transaction. + sig { returns(T.nilable(String)) } attr_reader :financing_offer - sig { returns(String) } + # A unique identifier for the financing transaction object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The Capital transaction object that predates the Financing Transactions API and # corresponds with the balance transaction that was created as a result of this # financing transaction. + sig { returns(String) } attr_reader :legacy_balance_transaction_source - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The object type: financing_transaction - attr_reader :object sig { returns(String) } + attr_reader :object + # The type of the financing transaction. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } + # A human-friendly description of the financing transaction. + sig { returns(T.nilable(String)) } attr_reader :user_facing_description end end diff --git a/rbi/stripe/resources/card.rbi b/rbi/stripe/resources/card.rbi index 6ff38acad..184537225 100644 --- a/rbi/stripe/resources/card.rbi +++ b/rbi/stripe/resources/card.rbi @@ -10,109 +10,142 @@ module Stripe # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) class Card < APIResource class Networks < Stripe::StripeObject + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account - sig { returns(T.nilable(String)) } + # City/District/Suburb/Town/Village. - attr_reader :address_city sig { returns(T.nilable(String)) } + attr_reader :address_city + # Billing address country, if provided when creating card. - attr_reader :address_country sig { returns(T.nilable(String)) } + attr_reader :address_country + # Address line 1 (Street address/PO Box/Company name). - attr_reader :address_line1 sig { returns(T.nilable(String)) } + attr_reader :address_line1 + # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_line1_check sig { returns(T.nilable(String)) } + attr_reader :address_line1_check + # Address line 2 (Apartment/Suite/Unit/Building). - attr_reader :address_line2 sig { returns(T.nilable(String)) } + attr_reader :address_line2 + # State/County/Province/Region. - attr_reader :address_state sig { returns(T.nilable(String)) } + attr_reader :address_state + # ZIP or postal code. - attr_reader :address_zip sig { returns(T.nilable(String)) } + attr_reader :address_zip + # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. + sig { returns(T.nilable(String)) } attr_reader :address_zip_check - sig { returns(T.nilable(T::Array[String])) } + # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + sig { returns(T.nilable(T::Array[String])) } attr_reader :available_payout_methods - sig { returns(String) } + # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + sig { returns(String) } attr_reader :brand - sig { returns(T.nilable(String)) } + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country sig { returns(T.nilable(String)) } + attr_reader :country + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } + # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + sig { returns(T.nilable(String)) } attr_reader :cvc_check - sig { returns(T.nilable(T::Boolean)) } + # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(T::Boolean)) } attr_reader :default_for_currency - sig { returns(String) } + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(String)) } + # (For tokenized numbers only.) The last four digits of the device account number. + sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - sig { returns(Integer) } + # Two-digit number representing the card's expiration month. - attr_reader :exp_month sig { returns(Integer) } + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(Integer) } attr_reader :exp_year - sig { returns(T.nilable(String)) } + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. # # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + sig { returns(T.nilable(String)) } attr_reader :fingerprint - sig { returns(String) } + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding sig { returns(String) } + attr_reader :funding + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin sig { returns(String) } + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer sig { returns(String) } + attr_reader :issuer + # The last four digits of the card. + sig { returns(String) } attr_reader :last4 - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # Cardholder name. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(Networks) } + # Attribute for field networks + sig { returns(Networks) } attr_reader :networks - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. - attr_reader :status sig { returns(T.nilable(String)) } + attr_reader :status + # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + sig { returns(T.nilable(String)) } attr_reader :tokenization_method - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/cash_balance.rbi b/rbi/stripe/resources/cash_balance.rbi index e3991a216..a1d7e8170 100644 --- a/rbi/stripe/resources/cash_balance.rbi +++ b/rbi/stripe/resources/cash_balance.rbi @@ -6,25 +6,31 @@ module Stripe # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. class CashBalance < APIResource class Settings < Stripe::StripeObject + # The configuration for how funds that land in the customer cash balance are reconciled. sig { returns(String) } attr_reader :reconciliation_mode + # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance sig { returns(T::Boolean) } attr_reader :using_merchant_default end - sig { returns(T.nilable(T::Hash[String, Integer])) } # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :available - sig { returns(String) } + # The ID of the customer whose cash balance this object represents. + sig { returns(String) } attr_reader :customer - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Settings) } + # Attribute for field settings + sig { returns(Settings) } attr_reader :settings end end \ No newline at end of file diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index 627a6fb5f..2afcdbb90 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -10,253 +10,357 @@ module Stripe class Charge < APIResource class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class FraudDetails < Stripe::StripeObject + # Assessments from Stripe. If set, the value is `fraudulent`. sig { returns(String) } attr_reader :stripe_report + # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. sig { returns(String) } attr_reader :user_report end class Level3 < Stripe::StripeObject class LineItem < Stripe::StripeObject + # Attribute for field discount_amount sig { returns(T.nilable(Integer)) } attr_reader :discount_amount + # Attribute for field product_code sig { returns(String) } attr_reader :product_code + # Attribute for field product_description sig { returns(String) } attr_reader :product_description + # Attribute for field quantity sig { returns(T.nilable(Integer)) } attr_reader :quantity + # Attribute for field tax_amount sig { returns(T.nilable(Integer)) } attr_reader :tax_amount + # Attribute for field unit_cost sig { returns(T.nilable(Integer)) } attr_reader :unit_cost end + # Attribute for field customer_reference sig { returns(String) } attr_reader :customer_reference + # Attribute for field line_items sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Attribute for field merchant_reference sig { returns(String) } attr_reader :merchant_reference + # Attribute for field shipping_address_zip sig { returns(String) } attr_reader :shipping_address_zip + # Attribute for field shipping_amount sig { returns(Integer) } attr_reader :shipping_amount + # Attribute for field shipping_from_zip sig { returns(String) } attr_reader :shipping_from_zip end class Outcome < Stripe::StripeObject class Rule < Stripe::StripeObject + # The action taken on the payment. sig { returns(String) } attr_reader :action + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The predicate to evaluate the payment against. sig { returns(String) } attr_reader :predicate end + # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. sig { returns(T.nilable(String)) } attr_reader :network_status + # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. sig { returns(T.nilable(String)) } attr_reader :reason + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. sig { returns(String) } attr_reader :risk_level + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. sig { returns(Integer) } attr_reader :risk_score + # The ID of the Radar rule that matched the payment, if applicable. sig { returns(T.any(String, Rule)) } attr_reader :rule + # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. sig { returns(T.nilable(String)) } attr_reader :seller_message + # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. sig { returns(String) } attr_reader :type end class PaymentMethodDetails < Stripe::StripeObject class AchCreditTransfer < Stripe::StripeObject + # Account number to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :account_number + # Name of the bank associated with the routing number. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Routing transit number for the bank account to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :routing_number + # SWIFT code of the bank associated with the routing number. sig { returns(T.nilable(String)) } attr_reader :swift_code end class AchDebit < Stripe::StripeObject + # Type of entity that holds the account. This can be either `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Routing transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end class AcssDebit < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Institution number of the bank account sig { returns(T.nilable(String)) } attr_reader :institution_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate + # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end class Affirm < Stripe::StripeObject + # The Affirm transaction ID associated with this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class AfterpayClearpay < Stripe::StripeObject + # The Afterpay order ID associated with this payment intent. sig { returns(T.nilable(String)) } attr_reader :order_id + # Order identifier shown to the merchant in Afterpay’s online portal. sig { returns(T.nilable(String)) } attr_reader :reference end class Alipay < Stripe::StripeObject + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. sig { returns(String) } attr_reader :buyer_id + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Transaction ID of this particular Alipay transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate end class BacsDebit < Stripe::StripeObject + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.nilable(String)) } attr_reader :mandate + # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Blik < Stripe::StripeObject + # A unique and immutable identifier assigned by BLIK to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Boleto < Stripe::StripeObject + # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end class DecrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the decremental authorization feature is supported. sig { returns(String) } attr_reader :status end class ExtendedAuthorization < Stripe::StripeObject + # Indicates whether or not the capture window is extended beyond the standard authorization. sig { returns(String) } attr_reader :status end class IncrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the incremental authorization feature is supported. sig { returns(String) } attr_reader :status end class Installments < Stripe::StripeObject class Plan < Stripe::StripeObject + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval + # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end + # Installment plan selected for the payment. sig { returns(T.nilable(Plan)) } attr_reader :plan end class Multicapture < Stripe::StripeObject + # Indicates whether or not multiple captures are supported. sig { returns(String) } attr_reader :status end class NetworkToken < Stripe::StripeObject + # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. sig { returns(T::Boolean) } attr_reader :used end class Overcapture < Stripe::StripeObject + # The maximum amount that can be captured. sig { returns(Integer) } attr_reader :maximum_amount_capturable + # Indicates whether or not the authorized amount can be over-captured. sig { returns(String) } attr_reader :status end class ThreeDSecure < Stripe::StripeObject + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. sig { returns(T.nilable(String)) } attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. sig { returns(T.nilable(String)) } attr_reader :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. sig { returns(T.nilable(String)) } attr_reader :exemption_indicator + # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + # the outcome of Stripe's internal risk assessment. sig { returns(T::Boolean) } attr_reader :exemption_indicator_applied + # Indicates the outcome of 3D Secure authentication. sig { returns(T.nilable(String)) } attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. sig { returns(T.nilable(String)) } attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id + # The version of 3D Secure that was used. sig { returns(T.nilable(String)) } attr_reader :version end @@ -267,511 +371,747 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type + # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end + # The authorized amount. sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Authorization code on the charge. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # Check results by Card networks on Card address and CVC at time of payment. sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field decremental_authorization sig { returns(DecrementalAuthorization) } attr_reader :decremental_authorization + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Attribute for field extended_authorization sig { returns(ExtendedAuthorization) } attr_reader :extended_authorization + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Attribute for field incremental_authorization sig { returns(IncrementalAuthorization) } attr_reader :incremental_authorization + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } attr_reader :installments + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment or created by it. sig { returns(T.nilable(String)) } attr_reader :mandate + # True if this payment was marked as MOTO and out of scope for SCA. sig { returns(T.nilable(T::Boolean)) } attr_reader :moto + # Attribute for field multicapture sig { returns(Multicapture) } attr_reader :multicapture + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # If this card has network token credentials, this contains the details of the network token credentials. sig { returns(T.nilable(NetworkToken)) } attr_reader :network_token + # Attribute for field overcapture sig { returns(Overcapture) } attr_reader :overcapture + # Populated if this transaction used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject + # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank + # Owner's verified full name. Values are verified or provided by EPS directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # EPS rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Fpx < Stripe::StripeObject + # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank + # Unique transaction id generated by FPX for every request from the merchant sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Giropay < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # Owner's verified full name. Values are verified or provided by Giropay directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Giropay rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject + # Unique transaction id generated by GrabPay sig { returns(T.nilable(String)) } attr_reader :transaction_id end class IdBankTransfer < Stripe::StripeObject + # Account number of the bank account to transfer funds to. sig { returns(String) } attr_reader :account_number + # Bank where the account is located. sig { returns(String) } attr_reader :bank + # Local bank code of the bank. sig { returns(String) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(String) } attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. sig { returns(String) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end + # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt end class KakaoPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Klarna < Stripe::StripeObject class PayerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # The payer address country sig { returns(T.nilable(String)) } attr_reader :country end + # The payer's address sig { returns(T.nilable(Address)) } attr_reader :address end + # The payer details for this transaction. sig { returns(T.nilable(PayerDetails)) } attr_reader :payer_details + # The Klarna payment method used for this transaction. + # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` sig { returns(T.nilable(String)) } attr_reader :payment_method_category + # Preferred language of the Klarna authorization page that the customer is redirected to. + # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` sig { returns(T.nilable(String)) } attr_reader :preferred_locale end class Konbini < Stripe::StripeObject class Store < Stripe::StripeObject + # The name of the convenience store chain where the payment was completed. sig { returns(T.nilable(String)) } attr_reader :chain end + # If the payment succeeded, this contains the details of the convenience store where the payment was completed. sig { returns(T.nilable(Store)) } attr_reader :store end class KrCard < Stripe::StripeObject + # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject + # Two-letter ISO code representing the funding source country beneath the Link payment. + # You could use this attribute to get a sense of international fees. sig { returns(T.nilable(String)) } attr_reader :country end class MbWay < Stripe::StripeObject; end class Mobilepay < Stripe::StripeObject class Card < Stripe::StripeObject + # Brand of the card used in the transaction sig { returns(T.nilable(String)) } attr_reader :brand + # Two-letter ISO code representing the country of the card sig { returns(T.nilable(String)) } attr_reader :country + # Two digit number representing the card's expiration month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Two digit number representing the card's expiration year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # The last 4 digits of the card sig { returns(T.nilable(String)) } attr_reader :last4 end + # Internal card details sig { returns(T.nilable(Card)) } attr_reader :card end class Multibanco < Stripe::StripeObject + # Entity number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :entity + # Reference number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :reference end class NaverPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Oxxo < Stripe::StripeObject + # OXXO reference number sig { returns(T.nilable(String)) } attr_reader :number end class P24 < Stripe::StripeObject + # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. sig { returns(T.nilable(String)) } attr_reader :bank + # Unique reference for this Przelewy24 payment. sig { returns(T.nilable(String)) } attr_reader :reference + # Owner's verified full name. Values are verified or provided by Przelewy24 directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Przelewy24 rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Payco < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Paynow < Stripe::StripeObject + # Reference number associated with this PayNow payment sig { returns(T.nilable(String)) } attr_reader :reference end class Paypal < Stripe::StripeObject class SellerProtection < Stripe::StripeObject + # An array of conditions that are covered for the transaction, if applicable. sig { returns(T.nilable(T::Array[String])) } attr_reader :dispute_categories + # Indicates whether the transaction is eligible for PayPal's seller protection. sig { returns(String) } attr_reader :status end class Shipping < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class VerifiedAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's full name. Values provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_name + # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. sig { returns(T.nilable(SellerProtection)) } attr_reader :seller_protection + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. sig { returns(T.nilable(Shipping)) } attr_reader :shipping + # A unique ID generated by PayPal for this transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. sig { returns(T.nilable(VerifiedAddress)) } attr_reader :verified_address + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email + # Owner's verified full name. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Payto < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate + # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end class Pix < Stripe::StripeObject + # Unique transaction id generated by BCB sig { returns(T.nilable(String)) } attr_reader :bank_transaction_id end class Promptpay < Stripe::StripeObject + # Bill reference generated by PromptPay sig { returns(T.nilable(String)) } attr_reader :reference end @@ -779,388 +1119,543 @@ module Stripe class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject; end class SamsungPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class SepaCreditTransfer < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # IBAN of the bank account to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :iban end class SepaDebit < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 + # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). sig { returns(T.nilable(String)) } attr_reader :mandate end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the SOFORT authorization page that the customer is redirected to. + # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by SOFORT directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class StripeAccount < Stripe::StripeObject; end class Swish < Stripe::StripeObject + # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Payer bank reference number for the payment sig { returns(T.nilable(String)) } attr_reader :payment_reference + # The last four digits of the Swish account phone number sig { returns(T.nilable(String)) } attr_reader :verified_phone_last4 end class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # Reference number to locate ACH payments with customer's bank. sig { returns(T.nilable(String)) } attr_reader :payment_reference + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end class Wechat < Stripe::StripeObject; end class WechatPay < Stripe::StripeObject + # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Transaction ID of this particular WeChat Pay transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Zip < Stripe::StripeObject; end + # Attribute for field ach_credit_transfer sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer + # Attribute for field ach_debit sig { returns(AchDebit) } attr_reader :ach_debit + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay + # Attribute for field qris sig { returns(Qris) } attr_reader :qris + # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_credit_transfer sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field stripe_account sig { returns(StripeAccount) } attr_reader :stripe_account + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field twint sig { returns(Twint) } attr_reader :twint + # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + # An additional hash is included on `payment_method_details` with a name matching this value. + # It contains information specific to the payment method. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account + # Attribute for field wechat sig { returns(Wechat) } attr_reader :wechat + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. sig { returns(String) } attr_reader :session end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TransferData < Stripe::StripeObject + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. sig { returns(T.nilable(Integer)) } attr_reader :amount + # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(Integer) } # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). - attr_reader :amount_captured sig { returns(Integer) } + attr_reader :amount_captured + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + sig { returns(Integer) } attr_reader :amount_refunded - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the charge. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } + # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } attr_reader :application_fee - sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(String) } + # Authorization code on the charge. + sig { returns(String) } attr_reader :authorization_code - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(BillingDetails) } + # Attribute for field billing_details + sig { returns(BillingDetails) } attr_reader :billing_details - sig { returns(T.nilable(String)) } + # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + sig { returns(T.nilable(String)) } attr_reader :calculated_statement_descriptor - sig { returns(T::Boolean) } + # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + sig { returns(T::Boolean) } attr_reader :captured - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the customer this charge is for if one exists. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Boolean) } + # Whether the charge has been disputed. + sig { returns(T::Boolean) } attr_reader :disputed - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :failure_balance_transaction - sig { returns(T.nilable(String)) } + # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code + # Message to user further explaining reason for charge failure if available. + sig { returns(T.nilable(String)) } attr_reader :failure_message - sig { returns(T.nilable(FraudDetails)) } + # Information on fraud assessments for the charge. + sig { returns(T.nilable(FraudDetails)) } attr_reader :fraud_details - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice this charge is for if one exists. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(Level3) } + # Attribute for field level3 + sig { returns(Level3) } attr_reader :level3 - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(Outcome)) } + # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + sig { returns(T.nilable(Outcome)) } attr_reader :outcome - sig { returns(T::Boolean) } + # `true` if the charge succeeded, or was successfully authorized for later capture. + sig { returns(T::Boolean) } attr_reader :paid - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent associated with this charge, if one exists. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(T.nilable(String)) } + # ID of the payment method used in this charge. + sig { returns(T.nilable(String)) } attr_reader :payment_method - sig { returns(T.nilable(PaymentMethodDetails)) } + # Details about the payment method at the time of the transaction. + sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - sig { returns(RadarOptions) } + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(RadarOptions) } attr_reader :radar_options - sig { returns(T.nilable(String)) } + # This is the email address that the receipt for this charge was sent to. - attr_reader :receipt_email sig { returns(T.nilable(String)) } + attr_reader :receipt_email + # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. - attr_reader :receipt_number sig { returns(T.nilable(String)) } + attr_reader :receipt_number + # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + sig { returns(T.nilable(String)) } attr_reader :receipt_url - sig { returns(T::Boolean) } + # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + sig { returns(T::Boolean) } attr_reader :refunded - sig { returns(T.nilable(Stripe::ListObject)) } + # A list of refunds that have been applied to the charge. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :refunds - sig { returns(T.nilable(T.any(String, Stripe::Review))) } + # ID of the review associated with this charge if one exists. + sig { returns(T.nilable(T.any(String, Stripe::Review))) } attr_reader :review - sig { returns(T.nilable(Shipping)) } + # Shipping information for the charge. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping + + # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. sig { returns(T.nilable(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))) } - # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. attr_reader :source - sig { returns(T.nilable(T.any(String, Stripe::Transfer))) } + # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + sig { returns(T.nilable(T.any(String, Stripe::Transfer))) } attr_reader :source_transfer - sig { returns(T.nilable(String)) } + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix - sig { returns(String) } + # The status of the payment is either `succeeded`, `pending`, or `failed`. + sig { returns(String) } attr_reader :status - sig { returns(T.any(String, Stripe::Transfer)) } + # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + sig { returns(T.any(String, Stripe::Transfer)) } attr_reader :transfer - sig { returns(T.nilable(TransferData)) } + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(T.nilable(String)) } attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index 0a8c9a629..c7b52e2f3 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -20,930 +20,1478 @@ module Stripe # Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) class Session < APIResource class AdaptivePricing < Stripe::StripeObject + # Whether Adaptive Pricing is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class AfterExpiration < Stripe::StripeObject class Recovery < Stripe::StripeObject + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` sig { returns(T::Boolean) } attr_reader :allow_promotion_codes + # If `true`, a recovery url will be generated to recover this Checkout Session if it + # expires before a transaction is completed. It will be attached to the + # Checkout Session object upon expiration. sig { returns(T::Boolean) } attr_reader :enabled + # The timestamp at which the recovery URL will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session sig { returns(T.nilable(String)) } attr_reader :url end + # When set, configuration used to recover the Checkout Session on expiry. sig { returns(T.nilable(Recovery)) } attr_reader :recovery end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Indicates whether automatic tax is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this session. sig { returns(T.nilable(String)) } attr_reader :status end class CollectedInformation < Stripe::StripeObject class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end + # Customer’s business name for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :business_name + # Customer’s email for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :email + # Customer’s phone number for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :phone + # Shipping information for this Checkout Session. sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details + # Customer’s tax ids for this Checkout Session. sig { returns(T.nilable(T::Array[TaxId])) } attr_reader :tax_ids end class Consent < Stripe::StripeObject + # If `opt_in`, the customer consents to receiving promotional communications + # from the merchant about this Checkout Session. sig { returns(T.nilable(String)) } attr_reader :promotions + # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. sig { returns(String) } attr_reader :position end + # If set to `hidden`, it will hide legal text related to the reuse of a payment method. sig { returns(T.nilable(PaymentMethodReuseAgreement)) } attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. sig { returns(T.nilable(String)) } attr_reader :promotions + # If set to `required`, it requires customers to accept the terms of service before being able to pay. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class CurrencyConversion < Stripe::StripeObject + # Total of all items in source currency before discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total of all items in source currency after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # Exchange rate used to convert source currency amounts to customer currency amounts sig { returns(String) } attr_reader :fx_rate + # Creation currency of the CheckoutSession before localization sig { returns(String) } attr_reader :source_currency end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject + # The label for the option, displayed to the customer. Up to 100 characters. sig { returns(String) } attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. sig { returns(String) } attr_reader :value end + # The value that will pre-fill on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value + # The options available for the customer to select. Up to 200 options allowed. sig { returns(T::Array[Option]) } attr_reader :options + # The option selected by the customer. This will be the `value` for the option. sig { returns(T.nilable(String)) } attr_reader :value end class Label < Stripe::StripeObject + # Custom text for the label, displayed to the customer. Up to 50 characters. sig { returns(T.nilable(String)) } attr_reader :custom + # The type of the label. sig { returns(String) } attr_reader :type end class Numeric < Stripe::StripeObject + # The value that will pre-fill the field on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length + # The value entered by the customer, containing only digits. sig { returns(T.nilable(String)) } attr_reader :value end class Text < Stripe::StripeObject + # The value that will pre-fill the field on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length + # The value entered by the customer. sig { returns(T.nilable(String)) } attr_reader :value end + # Attribute for field dropdown sig { returns(Dropdown) } attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. sig { returns(String) } attr_reader :key + # Attribute for field label sig { returns(Label) } attr_reader :label + # Attribute for field numeric sig { returns(Numeric) } attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. sig { returns(T::Boolean) } attr_reader :optional + # Attribute for field text sig { returns(Text) } attr_reader :text + # The type of the field. sig { returns(String) } attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end + # Custom text that should be displayed after the payment confirmation button. sig { returns(T.nilable(AfterSubmit)) } attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. sig { returns(T.nilable(Submit)) } attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. sig { returns(T.nilable(TermsOfServiceAcceptance)) } attr_reader :terms_of_service_acceptance end class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end + # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. sig { returns(T.nilable(Address)) } attr_reader :address + # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. sig { returns(T.nilable(String)) } attr_reader :email + # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. sig { returns(T.nilable(String)) } attr_reader :name + # The customer's phone number after a completed Checkout Session. sig { returns(T.nilable(String)) } attr_reader :phone + # The customer’s tax exempt status after a completed Checkout Session. sig { returns(T.nilable(String)) } attr_reader :tax_exempt + # The customer’s tax IDs after a completed Checkout Session. sig { returns(T.nilable(T::Array[TaxId])) } attr_reader :tax_ids end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display end + # The account tax IDs associated with the invoice. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Custom fields displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Footer displayed on the invoice. sig { returns(T.nilable(String)) } attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # Options for invoice PDF rendering. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end + # Indicates whether invoice creation is enabled for the Checkout Session. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field invoice_data sig { returns(InvoiceData) } attr_reader :invoice_data end class PaymentMethodConfigurationDetails < Stripe::StripeObject + # ID of the payment method configuration used. sig { returns(String) } attr_reader :id + # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. sig { returns(T::Array[String]) } attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Currency supported by the bank account. Returned when the Session is in `setup` mode. sig { returns(String) } attr_reader :currency + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Affirm < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AmazonPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Indicates if installments are enabled sig { returns(T::Boolean) } attr_reader :enabled end + # Attribute for field installments sig { returns(Installments) } attr_reader :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. sig { returns(String) } attr_reader :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. sig { returns(String) } attr_reader :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(String) } attr_reader :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kanji end class Cashapp < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KakaoPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Oxxo < Stripe::StripeObject + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Pix < Stripe::StripeObject + # The number of seconds after which Pix payment will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_seconds end class RevolutPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Swish < Stripe::StripeObject + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. sig { returns(T.nilable(String)) } attr_reader :reference end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. sig { returns(T.nilable(String)) } attr_reader :shipping_details end + # Permissions for updating the Checkout Session. sig { returns(T.nilable(Update)) } attr_reader :update end class PhoneNumberCollection < Stripe::StripeObject + # Indicates whether phone number collection is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled end class SavedPaymentMethodOptions < Stripe::StripeObject + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. sig { returns(T.nilable(T::Array[String])) } attr_reader :allow_redisplay_filters + # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. sig { returns(T.nilable(String)) } attr_reader :payment_method_remove + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. sig { returns(T.nilable(String)) } attr_reader :payment_method_save end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. sig { returns(T::Array[String]) } attr_reader :allowed_countries end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this order. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class ShippingOption < Stripe::StripeObject + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :shipping_amount + # The shipping rate. sig { returns(T.any(String, Stripe::ShippingRate)) } attr_reader :shipping_rate end class TaxIdCollection < Stripe::StripeObject + # Indicates whether tax ID collection is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled + # Indicates whether a tax ID is required on the payment page sig { returns(String) } attr_reader :required end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - sig { returns(T.nilable(AdaptivePricing)) } # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + sig { returns(T.nilable(AdaptivePricing)) } attr_reader :adaptive_pricing - sig { returns(T.nilable(AfterExpiration)) } + # When set, provides configuration for actions to take if this Checkout Session expires. + sig { returns(T.nilable(AfterExpiration)) } attr_reader :after_expiration - sig { returns(T.nilable(T::Boolean)) } + # Enables user redeemable promotion codes. + sig { returns(T.nilable(T::Boolean)) } attr_reader :allow_promotion_codes - sig { returns(T.nilable(Integer)) } + # Total of all items before discounts or taxes are applied. - attr_reader :amount_subtotal sig { returns(T.nilable(Integer)) } + attr_reader :amount_subtotal + # Total of all items after discounts and taxes are applied. + sig { returns(T.nilable(Integer)) } attr_reader :amount_total - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(String)) } + # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. - attr_reader :billing_address_collection sig { returns(T.nilable(String)) } + attr_reader :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. - attr_reader :cancel_url sig { returns(T.nilable(String)) } + attr_reader :cancel_url + # A unique string to reference the Checkout Session. This can be a # customer ID, a cart ID, or similar, and can be used to reconcile the # Session with your internal systems. - attr_reader :client_reference_id sig { returns(T.nilable(String)) } + attr_reader :client_reference_id + # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(T.nilable(CollectedInformation)) } + # Information about the customer collected within the Checkout Session. + sig { returns(T.nilable(CollectedInformation)) } attr_reader :collected_information - sig { returns(T.nilable(Consent)) } + # Results of `consent_collection` for this session. + sig { returns(T.nilable(Consent)) } attr_reader :consent - sig { returns(T.nilable(ConsentCollection)) } + # When set, provides configuration for the Checkout Session to gather active consent from customers. + sig { returns(T.nilable(ConsentCollection)) } attr_reader :consent_collection - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T.nilable(CurrencyConversion)) } + # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions + sig { returns(T.nilable(CurrencyConversion)) } attr_reader :currency_conversion - sig { returns(T::Array[CustomField]) } + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[CustomField]) } attr_reader :custom_fields - sig { returns(CustomText) } + # Attribute for field custom_text + sig { returns(CustomText) } attr_reader :custom_text - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer for this Session. # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout # will create a new customer object based on information provided # during the payment flow unless an existing customer was provided when # the Session was created. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } + # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + sig { returns(T.nilable(String)) } attr_reader :customer_creation - sig { returns(T.nilable(CustomerDetails)) } + # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + sig { returns(T.nilable(CustomerDetails)) } attr_reader :customer_details - sig { returns(T.nilable(String)) } + # If provided, this value will be used when the Customer object is created. # If not provided, customers will be asked to enter their email address. # Use this parameter to prefill customer data if you already have an email # on file. To access information about the customer once the payment flow is # complete, use the `customer` attribute. + sig { returns(T.nilable(String)) } attr_reader :customer_email - sig { returns(Integer) } + # The timestamp at which the Checkout Session will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice created by the Checkout Session, if it exists. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T.nilable(InvoiceCreation)) } + # Details on the state of invoice creation for the Checkout Session. + sig { returns(T.nilable(InvoiceCreation)) } attr_reader :invoice_creation - sig { returns(Stripe::ListObject) } + # The line items purchased by the customer. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + sig { returns(T.nilable(String)) } attr_reader :locale - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # The mode of the Checkout Session. - attr_reader :mode sig { returns(String) } + attr_reader :mode + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) } + # The ID of the Payment Link that created this Session. + sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) } attr_reader :payment_link - sig { returns(T.nilable(String)) } + # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + sig { returns(T.nilable(String)) } attr_reader :payment_method_collection - sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } attr_reader :payment_method_configuration_details - sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T::Array[String]) } + # A list of the types of payment methods (e.g. card) this Checkout # Session is allowed to accept. + sig { returns(T::Array[String]) } attr_reader :payment_method_types - sig { returns(String) } + # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. # You can use this value to decide when to fulfill your customer's order. + sig { returns(String) } attr_reader :payment_status - sig { returns(T.nilable(Permissions)) } + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. # # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + sig { returns(T.nilable(Permissions)) } attr_reader :permissions - sig { returns(PhoneNumberCollection) } + # Attribute for field phone_number_collection + sig { returns(PhoneNumberCollection) } attr_reader :phone_number_collection - sig { returns(T.nilable(String)) } + # The ID of the original expired Checkout Session that triggered the recovery flow. + sig { returns(T.nilable(String)) } attr_reader :recovered_from - sig { returns(String) } + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. - attr_reader :redirect_on_completion sig { returns(String) } + attr_reader :redirect_on_completion + # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + sig { returns(String) } attr_reader :return_url - sig { returns(T.nilable(SavedPaymentMethodOptions)) } + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + sig { returns(T.nilable(SavedPaymentMethodOptions)) } attr_reader :saved_payment_method_options - sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } + # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } attr_reader :setup_intent - sig { returns(T.nilable(ShippingAddressCollection)) } + # When set, provides configuration for Checkout to collect a shipping address from a customer. + sig { returns(T.nilable(ShippingAddressCollection)) } attr_reader :shipping_address_collection - sig { returns(T.nilable(ShippingCost)) } + # The details of the customer cost of shipping, including the customer chosen ShippingRate. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this Checkout Session. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(T::Array[ShippingOption]) } + # The shipping rate options applied to this Session. + sig { returns(T::Array[ShippingOption]) } attr_reader :shipping_options - sig { returns(T.nilable(String)) } + # The status of the Checkout Session, one of `open`, `complete`, or `expired`. - attr_reader :status sig { returns(T.nilable(String)) } + attr_reader :status + # Describes the type of transaction being performed by Checkout in order to customize # relevant text on the page, such as the submit button. `submit_type` can only be # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + sig { returns(T.nilable(String)) } attr_reader :submit_type - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The ID of the subscription for Checkout Sessions in `subscription` mode. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(String)) } + # The URL the customer will be directed to after the payment or # subscription creation is successful. + sig { returns(T.nilable(String)) } attr_reader :success_url - sig { returns(TaxIdCollection) } + # Attribute for field tax_id_collection + sig { returns(TaxIdCollection) } attr_reader :tax_id_collection - sig { returns(T.nilable(TotalDetails)) } + # Tax and discount details for the computed total amount. + sig { returns(T.nilable(TotalDetails)) } attr_reader :total_details - sig { returns(T.nilable(String)) } + # The UI mode of the Session. Defaults to `hosted`. - attr_reader :ui_mode sig { returns(T.nilable(String)) } + attr_reader :ui_mode + # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` # This value is only present when the session is active. + sig { returns(T.nilable(String)) } attr_reader :url end end diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi index e70f319d7..fbe6c3b25 100644 --- a/rbi/stripe/resources/climate/order.rbi +++ b/rbi/stripe/resources/climate/order.rbi @@ -8,98 +8,130 @@ module Stripe # payment is deducted from your merchant balance. class Order < APIResource class Beneficiary < Stripe::StripeObject + # Publicly displayable name for the end beneficiary of carbon removal. sig { returns(String) } attr_reader :public_name end class DeliveryDetail < Stripe::StripeObject class Location < Stripe::StripeObject + # The city where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. sig { returns(String) } attr_reader :country + # The geographic latitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :latitude + # The geographic longitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :longitude + # The state/county/province/region where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :region end + # Time at which the delivery occurred. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :delivered_at + # Specific location of this delivery. sig { returns(T.nilable(Location)) } attr_reader :location + # Quantity of carbon removal supplied by this delivery. sig { returns(String) } attr_reader :metric_tons + # Once retired, a URL to the registry entry for the tons from this delivery. sig { returns(T.nilable(String)) } attr_reader :registry_url + # A supplier of carbon removal. sig { returns(Stripe::Climate::Supplier) } attr_reader :supplier end - sig { returns(Integer) } # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. - attr_reader :amount_fees sig { returns(Integer) } + attr_reader :amount_fees + # Total amount of the carbon removal in the currency's smallest unit. - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal + # Total amount of the order including fees in the currency's smallest unit. + sig { returns(Integer) } attr_reader :amount_total - sig { returns(Beneficiary) } + # Attribute for field beneficiary + sig { returns(Beneficiary) } attr_reader :beneficiary - sig { returns(T.nilable(Integer)) } + # Time at which the order was canceled. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - sig { returns(T.nilable(String)) } + # Reason for the cancellation of this order. - attr_reader :cancellation_reason sig { returns(T.nilable(String)) } + attr_reader :cancellation_reason + # For delivered orders, a URL to a delivery certificate for the order. + sig { returns(T.nilable(String)) } attr_reader :certificate - sig { returns(T.nilable(Integer)) } + # Time at which the order was confirmed. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :confirmed_at - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(Integer)) } + # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. - attr_reader :delayed_at sig { returns(T.nilable(Integer)) } + attr_reader :delayed_at + # Time at which the order was delivered. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :delivered_at - sig { returns(T::Array[DeliveryDetail]) } + # Details about the delivery of carbon removal for this order. + sig { returns(T::Array[DeliveryDetail]) } attr_reader :delivery_details - sig { returns(Integer) } + # The year this order is expected to be delivered. + sig { returns(Integer) } attr_reader :expected_delivery_year - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # Quantity of carbon removal that is included in this order. - attr_reader :metric_tons sig { returns(String) } + attr_reader :metric_tons + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Climate::Product)) } + # Unique ID for the Climate `Product` this order is purchasing. + sig { returns(T.any(String, Stripe::Climate::Product)) } attr_reader :product - sig { returns(T.nilable(Integer)) } + # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :product_substituted_at - sig { returns(String) } + # The current status of this order. + sig { returns(String) } attr_reader :status end end diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi index f2c914179..e56a4895f 100644 --- a/rbi/stripe/resources/climate/product.rbi +++ b/rbi/stripe/resources/climate/product.rbi @@ -8,41 +8,52 @@ module Stripe # You can retrieve it to see the current price and availability. class Product < APIResource class CurrentPricesPerMetricTon < Stripe::StripeObject + # Fees for one metric ton of carbon removal in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_fees + # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_subtotal + # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_total end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) } + # Current prices for a metric ton of carbon removal in a currency's smallest unit. + sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) } attr_reader :current_prices_per_metric_ton - sig { returns(T.nilable(Integer)) } + # The year in which the carbon removal is expected to be delivered. + sig { returns(T.nilable(Integer)) } attr_reader :delivery_year - sig { returns(String) } + # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) # for a list of available carbon removal products. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The quantity of metric tons available for reservation. - attr_reader :metric_tons_available sig { returns(String) } + attr_reader :metric_tons_available + # The Climate product's name. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Stripe::Climate::Supplier]) } + # The carbon removal suppliers that fulfill orders for this Climate product. + sig { returns(T::Array[Stripe::Climate::Supplier]) } attr_reader :suppliers end end diff --git a/rbi/stripe/resources/climate/supplier.rbi b/rbi/stripe/resources/climate/supplier.rbi index 04d8561d9..7c5e6c71a 100644 --- a/rbi/stripe/resources/climate/supplier.rbi +++ b/rbi/stripe/resources/climate/supplier.rbi @@ -7,37 +7,48 @@ module Stripe # A supplier of carbon removal. class Supplier < APIResource class Location < Stripe::StripeObject + # The city where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. sig { returns(String) } attr_reader :country + # The geographic latitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :latitude + # The geographic longitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :longitude + # The state/county/province/region where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :region end - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # Link to a webpage to learn more about the supplier. + sig { returns(String) } attr_reader :info_url - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Array[Location]) } + # The locations in which this supplier operates. + sig { returns(T::Array[Location]) } attr_reader :locations - sig { returns(String) } + # Name of this carbon removal supplier. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object’s type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The scientific pathway used for carbon removal. + sig { returns(String) } attr_reader :removal_pathway end end diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi index 19356d838..06667ebc4 100644 --- a/rbi/stripe/resources/confirmation_token.rbi +++ b/rbi/stripe/resources/confirmation_token.rbi @@ -14,37 +14,49 @@ module Stripe class MandateData < Stripe::StripeObject class CustomerAcceptance < Stripe::StripeObject class Online < Stripe::StripeObject + # The IP address from which the Mandate was accepted by the customer. sig { returns(T.nilable(String)) } attr_reader :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # If this is a Mandate accepted online, this hash contains details about the online acceptance. sig { returns(T.nilable(Online)) } attr_reader :online + # The type of customer acceptance information included with the Mandate. sig { returns(String) } attr_reader :type end + # This hash contains details about the customer acceptance of the Mandate. sig { returns(CustomerAcceptance) } attr_reader :customer_acceptance end class PaymentMethodOptions < Stripe::StripeObject class Card < Stripe::StripeObject + # The `cvc_update` Token collected from the Payment Element. sig { returns(T.nilable(String)) } attr_reader :cvc_token end + # This hash contains the card payment method options. sig { returns(T.nilable(Card)) } attr_reader :card end class PaymentMethodPreview < Stripe::StripeObject class AcssDebit < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Institution number of the bank account. sig { returns(T.nilable(String)) } attr_reader :institution_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end @@ -54,57 +66,77 @@ module Stripe class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # Six-digit number identifying bank and branch associated with this bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 end class BacsDebit < Stripe::StripeObject + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end @@ -112,105 +144,152 @@ module Stripe class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. sig { returns(String) } attr_reader :type end + # The charge that created this object. sig { returns(T.nilable(String)) } attr_reader :charge + # Transaction-specific details of the payment method used in the payment. sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. sig { returns(T::Boolean) } attr_reader :supported end @@ -221,199 +300,287 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type + # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand + # Checks on Card address and CVC if provided. sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. sig { returns(T.nilable(String)) } attr_reader :display_brand + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } attr_reader :funding + # Details of the original PaymentMethod that created this object. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(String) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Contains details on how this Card may be used for 3D Secure authentication. sig { returns(T.nilable(ThreeDSecureUsage)) } attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject + # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank end class Fpx < Stripe::StripeObject + # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank end @@ -421,80 +588,112 @@ module Stripe class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field display_name sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. sig { returns(T.nilable(String)) } attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end + # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end + # The customer's date of birth, if provided. sig { returns(T.nilable(Dob)) } attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject + # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject + # Account owner's email address. sig { returns(T.nilable(String)) } attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(String) } attr_reader :persistent_token end @@ -502,31 +701,42 @@ module Stripe class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. sig { returns(String) } attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. sig { returns(T.nilable(String)) } attr_reader :bank end class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end @@ -535,13 +745,17 @@ module Stripe class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(Integer) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(Integer) } attr_reader :month + # The four-digit year of birth. sig { returns(Integer) } attr_reader :year end + # Attribute for field dob sig { returns(Dob) } attr_reader :dob end @@ -549,26 +763,35 @@ module Stripe class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject + # The ID of the Charge that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country end @@ -576,222 +799,315 @@ module Stripe class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject + # The preferred network. sig { returns(T.nilable(String)) } attr_reader :preferred + # All supported networks. sig { returns(T::Array[String]) } attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject + # The ACH network code that resulted in this block. sig { returns(T.nilable(String)) } attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked sig { returns(T.nilable(String)) } attr_reader :reason end + # Attribute for field blocked sig { returns(Blocked) } attr_reader :blocked end + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account number of the bank account. sig { returns(T.nilable(String)) } attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # The name of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. sig { returns(T.nilable(String)) } attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about US bank account networks that can be used. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. sig { returns(String) } attr_reader :allow_redisplay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay + # Attribute for field qris sig { returns(Qris) } attr_reader :qris + # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field twint sig { returns(Twint) } attr_reader :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } + # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(MandateData)) } + # Data used for generating a Mandate. + sig { returns(T.nilable(MandateData)) } attr_reader :mandate_data - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + sig { returns(T.nilable(String)) } attr_reader :payment_intent - sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for this ConfirmationToken. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T.nilable(PaymentMethodPreview)) } + # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + sig { returns(T.nilable(PaymentMethodPreview)) } attr_reader :payment_method_preview - sig { returns(T.nilable(String)) } + # Return URL used to confirm the Intent. - attr_reader :return_url sig { returns(T.nilable(String)) } + attr_reader :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. # # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. - attr_reader :setup_future_usage sig { returns(T.nilable(String)) } + attr_reader :setup_future_usage + # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + sig { returns(T.nilable(String)) } attr_reader :setup_intent - sig { returns(T.nilable(Shipping)) } + # Shipping information collected on this ConfirmationToken. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping - sig { returns(T::Boolean) } + # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + sig { returns(T::Boolean) } attr_reader :use_stripe_sdk end end \ No newline at end of file diff --git a/rbi/stripe/resources/connect_collection_transfer.rbi b/rbi/stripe/resources/connect_collection_transfer.rbi index 716c92fd2..3aecb1eb1 100644 --- a/rbi/stripe/resources/connect_collection_transfer.rbi +++ b/rbi/stripe/resources/connect_collection_transfer.rbi @@ -4,23 +4,28 @@ # typed: true module Stripe class ConnectCollectionTransfer < APIResource - sig { returns(Integer) } # Amount transferred, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Account)) } + # ID of the account that funds are being collected for. + sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/country_spec.rbi b/rbi/stripe/resources/country_spec.rbi index 3b006e099..62bad5b38 100644 --- a/rbi/stripe/resources/country_spec.rbi +++ b/rbi/stripe/resources/country_spec.rbi @@ -12,45 +12,58 @@ module Stripe class CountrySpec < APIResource class VerificationFields < Stripe::StripeObject class Company < Stripe::StripeObject + # Additional fields which are only required for some users. sig { returns(T::Array[String]) } attr_reader :additional + # Fields which every account must eventually provide. sig { returns(T::Array[String]) } attr_reader :minimum end class Individual < Stripe::StripeObject + # Additional fields which are only required for some users. sig { returns(T::Array[String]) } attr_reader :additional + # Fields which every account must eventually provide. sig { returns(T::Array[String]) } attr_reader :minimum end + # Attribute for field company sig { returns(Company) } attr_reader :company + # Attribute for field individual sig { returns(Individual) } attr_reader :individual end - sig { returns(String) } # The default currency for this country. This applies to both payment methods and bank accounts. - attr_reader :default_currency sig { returns(String) } + attr_reader :default_currency + # Unique identifier for the object. Represented as the ISO country code for this country. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, T::Array[String]]) } + # Currencies that can be accepted in the specific country (for transfers). + sig { returns(T::Hash[String, T::Array[String]]) } attr_reader :supported_bank_account_currencies - sig { returns(T::Array[String]) } + # Currencies that can be accepted in the specified country (for payments). - attr_reader :supported_payment_currencies sig { returns(T::Array[String]) } + attr_reader :supported_payment_currencies + # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). - attr_reader :supported_payment_methods sig { returns(T::Array[String]) } + attr_reader :supported_payment_methods + # Countries that can accept transfers from the specified country. + sig { returns(T::Array[String]) } attr_reader :supported_transfer_countries - sig { returns(VerificationFields) } + # Attribute for field verification_fields + sig { returns(VerificationFields) } attr_reader :verification_fields end end \ No newline at end of file diff --git a/rbi/stripe/resources/coupon.rbi b/rbi/stripe/resources/coupon.rbi index 711b2c7c6..a78aa22ec 100644 --- a/rbi/stripe/resources/coupon.rbi +++ b/rbi/stripe/resources/coupon.rbi @@ -8,66 +8,85 @@ module Stripe # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). class Coupon < APIResource class AppliesTo < Stripe::StripeObject + # A list of product IDs this coupon applies to sig { returns(T::Array[String]) } attr_reader :products end class CurrencyOptions < Stripe::StripeObject + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. sig { returns(Integer) } attr_reader :amount_off end - sig { returns(T.nilable(Integer)) } # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + sig { returns(T.nilable(Integer)) } attr_reader :amount_off - sig { returns(AppliesTo) } + # Attribute for field applies_to + sig { returns(AppliesTo) } attr_reader :applies_to - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T::Hash[String, CurrencyOptions]) } + # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options - sig { returns(String) } + # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + sig { returns(String) } attr_reader :duration - sig { returns(T.nilable(Integer)) } + # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + sig { returns(T.nilable(Integer)) } attr_reader :duration_in_months - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(Integer)) } + # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + sig { returns(T.nilable(Integer)) } attr_reader :max_redemptions - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # Name of the coupon displayed to customers on for instance invoices or receipts. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Float)) } + # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + sig { returns(T.nilable(Float)) } attr_reader :percent_off - sig { returns(T.nilable(Integer)) } + # Date after which the coupon can no longer be redeemed. + sig { returns(T.nilable(Integer)) } attr_reader :redeem_by - sig { returns(Integer) } + # Number of times this coupon has been applied to a customer. + sig { returns(Integer) } attr_reader :times_redeemed - sig { returns(T::Boolean) } + # Taking account of the above properties, whether this coupon can still be applied to a customer. - attr_reader :valid sig { returns(T::Boolean) } + attr_reader :valid + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi index d179e2935..d21ff6895 100644 --- a/rbi/stripe/resources/credit_note.rbi +++ b/rbi/stripe/resources/credit_note.rbi @@ -8,162 +8,219 @@ module Stripe # Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) class CreditNote < APIResource class DiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class Refund < Stripe::StripeObject + # Amount of the refund that applies to this credit note, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_refunded + # ID of the refund. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class TaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # This is the sum of all the shipping amounts. - attr_reader :amount_shipping sig { returns(Integer) } + attr_reader :amount_shipping + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) } + # Customer balance transaction related to this credit note. + sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) } attr_reader :customer_balance_transaction - sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + sig { returns(Integer) } attr_reader :discount_amount - sig { returns(T::Array[DiscountAmount]) } + # The aggregate amounts calculated per discount for all line items. + sig { returns(T::Array[DiscountAmount]) } attr_reader :discount_amounts - sig { returns(T.nilable(Integer)) } + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(T.nilable(Integer)) } attr_reader :effective_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.any(String, Stripe::Invoice)) } + # ID of the invoice. + sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - sig { returns(Stripe::ListObject) } + # Line items that make up the credit note + sig { returns(Stripe::ListObject) } attr_reader :lines - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # Customer-facing text that appears on the credit note PDF. + sig { returns(T.nilable(String)) } attr_reader :memo - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. - attr_reader :number sig { returns(String) } + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Integer)) } + # Amount that was credited outside of Stripe. + sig { returns(T.nilable(Integer)) } attr_reader :out_of_band_amount - sig { returns(String) } + # The link to download the PDF of the credit note. + sig { returns(String) } attr_reader :pdf - sig { returns(Integer) } + # Attribute for field post_payment_amount - attr_reader :post_payment_amount sig { returns(Integer) } + attr_reader :post_payment_amount + # Attribute for field pre_payment_amount + sig { returns(Integer) } attr_reader :pre_payment_amount - sig { returns(T::Array[PretaxCreditAmount]) } + # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + sig { returns(T::Array[PretaxCreditAmount]) } attr_reader :pretax_credit_amounts - sig { returns(T.nilable(String)) } + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(T.nilable(String)) } attr_reader :reason - sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # Refund related to this credit note. + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } attr_reader :refund - sig { returns(T::Array[Refund]) } + # Refunds related to this credit note. + sig { returns(T::Array[Refund]) } attr_reader :refunds - sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied to the invoice. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(String) } + # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + sig { returns(String) } attr_reader :status - sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + sig { returns(Integer) } attr_reader :subtotal - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + sig { returns(T.nilable(Integer)) } attr_reader :subtotal_excluding_tax - sig { returns(T::Array[TaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. + sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts - sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + sig { returns(Integer) } attr_reader :total - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + sig { returns(T.nilable(Integer)) } attr_reader :total_excluding_tax - sig { returns(String) } + # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Integer)) } + # The time that the credit note was voided. + sig { returns(T.nilable(Integer)) } attr_reader :voided_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi index e3ea6442d..a33492b4b 100644 --- a/rbi/stripe/resources/credit_note_line_item.rbi +++ b/rbi/stripe/resources/credit_note_line_item.rbi @@ -6,83 +6,110 @@ module Stripe # The credit note line item object class CreditNoteLineItem < StripeObject class DiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. + sig { returns(T.nilable(Integer)) } attr_reader :amount_excluding_tax - sig { returns(T.nilable(String)) } + # Description of the item being credited. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + sig { returns(Integer) } attr_reader :discount_amount - sig { returns(T::Array[DiscountAmount]) } + # The amount of discount calculated per discount for this line item + sig { returns(T::Array[DiscountAmount]) } attr_reader :discount_amounts - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # ID of the invoice line item being credited + sig { returns(String) } attr_reader :invoice_line_item - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[PretaxCreditAmount]) } + # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + sig { returns(T::Array[PretaxCreditAmount]) } attr_reader :pretax_credit_amounts - sig { returns(T.nilable(Integer)) } + # The number of units of product being credited. + sig { returns(T.nilable(Integer)) } attr_reader :quantity - sig { returns(T::Array[TaxAmount]) } + # The amount of tax calculated per tax rate for this line item + sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts - sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates which apply to the line item. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :tax_rates - sig { returns(String) } + # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Integer)) } + # The cost of each unit of product being credited. + sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - sig { returns(T.nilable(String)) } + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :unit_amount_decimal sig { returns(T.nilable(String)) } + attr_reader :unit_amount_decimal + # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_excluding_tax end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer.rbi b/rbi/stripe/resources/customer.rbi index 588078036..62ac8710a 100644 --- a/rbi/stripe/resources/customer.rbi +++ b/rbi/stripe/resources/customer.rbi @@ -7,177 +7,236 @@ module Stripe # and track payments that belong to the same customer. class Customer < APIResource class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class InvoiceSettings < Stripe::StripeObject class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display + # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. sig { returns(T.nilable(String)) } attr_reader :template end + # Default custom fields to be displayed on invoices for this customer. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # Default footer to be displayed on invoices for this customer. sig { returns(T.nilable(String)) } attr_reader :footer + # Default options for invoice PDF rendering for this customer. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class Tax < Stripe::StripeObject class Location < Stripe::StripeObject + # The customer's country as identified by Stripe Tax. sig { returns(String) } attr_reader :country + # The data source used to infer the customer's location. sig { returns(String) } attr_reader :source + # The customer's state, county, province, or region as identified by Stripe Tax. sig { returns(T.nilable(String)) } attr_reader :state end + # Surfaces if automatic tax computation is possible given the current customer location information. sig { returns(String) } attr_reader :automatic_tax + # A recent IP address of the customer used for tax reporting and tax location inference. sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer's location as identified by Stripe Tax. sig { returns(T.nilable(Location)) } attr_reader :location end - sig { returns(T.nilable(Address)) } # The customer's address. + sig { returns(T.nilable(Address)) } attr_reader :address - sig { returns(Integer) } + # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + sig { returns(Integer) } attr_reader :balance - sig { returns(T.nilable(Stripe::CashBalance)) } + # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + sig { returns(T.nilable(Stripe::CashBalance)) } attr_reader :cash_balance - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { - returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) - } + # ID of the default payment source for the customer. # # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } attr_reader :default_source - sig { returns(T.nilable(T::Boolean)) } + # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. # # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. # # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + sig { returns(T.nilable(T::Boolean)) } attr_reader :delinquent - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount active on the customer, if there is one. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T.nilable(String)) } + # The customer's email address. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Hash[String, Integer]) } + # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + sig { returns(T::Hash[String, Integer]) } attr_reader :invoice_credit_balance - sig { returns(T.nilable(String)) } + # The prefix for the customer used to generate unique invoice numbers. + sig { returns(T.nilable(String)) } attr_reader :invoice_prefix - sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings + sig { returns(InvoiceSettings) } attr_reader :invoice_settings - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # The customer's full name or business name. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(Integer) } + # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + sig { returns(Integer) } attr_reader :next_invoice_sequence - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The customer's phone number. + sig { returns(T.nilable(String)) } attr_reader :phone - sig { returns(T.nilable(T::Array[String])) } + # The customer's preferred locales (languages), ordered by preference. + sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - sig { returns(T.nilable(Shipping)) } + # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping - sig { returns(Stripe::ListObject) } + # The customer's payment sources, if any. - attr_reader :sources sig { returns(Stripe::ListObject) } + attr_reader :sources + # The customer's current subscriptions, if any. + sig { returns(Stripe::ListObject) } attr_reader :subscriptions - sig { returns(Tax) } + # Attribute for field tax + sig { returns(Tax) } attr_reader :tax - sig { returns(T.nilable(String)) } + # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + sig { returns(T.nilable(String)) } attr_reader :tax_exempt - sig { returns(Stripe::ListObject) } + # The customer's tax IDs. + sig { returns(Stripe::ListObject) } attr_reader :tax_ids - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock that this customer belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_balance_transaction.rbi b/rbi/stripe/resources/customer_balance_transaction.rbi index 0dd62d98b..270d5942a 100644 --- a/rbi/stripe/resources/customer_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_balance_transaction.rbi @@ -10,44 +10,56 @@ module Stripe # # Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) class CustomerBalanceTransaction < APIResource - sig { returns(Integer) } # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) } + # The ID of the credit note (if any) related to the transaction. + sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) } attr_reader :credit_note - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } + # The ID of the customer the transaction belongs to. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(Integer) } + # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + sig { returns(Integer) } attr_reader :ending_balance - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the invoice (if any) related to the transaction. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_cash_balance_transaction.rbi b/rbi/stripe/resources/customer_cash_balance_transaction.rbi index 4864d51b8..23eb765b4 100644 --- a/rbi/stripe/resources/customer_cash_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_cash_balance_transaction.rbi @@ -9,119 +9,157 @@ module Stripe # to payments, and refunds to the customer. class CustomerCashBalanceTransaction < APIResource class AdjustedForOverdraft < Stripe::StripeObject + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :balance_transaction + # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. sig { returns(T.any(String, Stripe::CustomerCashBalanceTransaction)) } attr_reader :linked_transaction end class AppliedToPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end class Funded < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The BIC of the bank of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :bic + # The last 4 digits of the IBAN of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end class GbBankTransfer < Stripe::StripeObject + # The last 4 digits of the account number of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :account_number_last4 + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name + # The sort code of the bank of the sender of the funding sig { returns(T.nilable(String)) } attr_reader :sort_code end class JpBankTransfer < Stripe::StripeObject + # The name of the bank of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :sender_bank + # The name of the bank branch of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :sender_branch + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end class UsBankTransfer < Stripe::StripeObject + # The banking network used for this funding. sig { returns(String) } attr_reader :network + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer sig { returns(GbBankTransfer) } attr_reader :gb_bank_transfer + # Attribute for field jp_bank_transfer sig { returns(JpBankTransfer) } attr_reader :jp_bank_transfer + # The user-supplied reference field on the bank transfer. sig { returns(T.nilable(String)) } attr_reader :reference + # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_transfer sig { returns(UsBankTransfer) } attr_reader :us_bank_transfer end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer end class RefundedFromPayment < Stripe::StripeObject + # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund end class TransferredToBalance < Stripe::StripeObject + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :balance_transaction end class UnappliedFromPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end - sig { returns(AdjustedForOverdraft) } # Attribute for field adjusted_for_overdraft + sig { returns(AdjustedForOverdraft) } attr_reader :adjusted_for_overdraft - sig { returns(AppliedToPayment) } + # Attribute for field applied_to_payment + sig { returns(AppliedToPayment) } attr_reader :applied_to_payment - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } + # The customer whose available cash balance changed as a result of this transaction. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(Integer) } + # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :ending_balance - sig { returns(Funded) } + # Attribute for field funded + sig { returns(Funded) } attr_reader :funded - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Integer) } + # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + sig { returns(Integer) } attr_reader :net_amount - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(RefundedFromPayment) } + # Attribute for field refunded_from_payment + sig { returns(RefundedFromPayment) } attr_reader :refunded_from_payment - sig { returns(TransferredToBalance) } + # Attribute for field transferred_to_balance + sig { returns(TransferredToBalance) } attr_reader :transferred_to_balance - sig { returns(String) } + # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + sig { returns(String) } attr_reader :type - sig { returns(UnappliedFromPayment) } + # Attribute for field unapplied_from_payment + sig { returns(UnappliedFromPayment) } attr_reader :unapplied_from_payment end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi index 55e768f7b..a1a5f6900 100644 --- a/rbi/stripe/resources/customer_session.rbi +++ b/rbi/stripe/resources/customer_session.rbi @@ -12,62 +12,89 @@ module Stripe class CustomerSession < APIResource class Components < Stripe::StripeObject class BuyButton < Stripe::StripeObject + # Whether the buy button is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class PaymentElement < Stripe::StripeObject class Features < Stripe::StripeObject + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. sig { returns(T::Array[String]) } attr_reader :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. sig { returns(String) } attr_reader :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. sig { returns(T.nilable(Integer)) } attr_reader :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). sig { returns(String) } attr_reader :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. sig { returns(String) } attr_reader :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. sig { returns(T.nilable(String)) } attr_reader :payment_method_save_usage end + # Whether the Payment Element is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # This hash defines whether the Payment Element supports certain features. sig { returns(T.nilable(Features)) } attr_reader :features end class PricingTable < Stripe::StripeObject + # Whether the pricing table is enabled. sig { returns(T::Boolean) } attr_reader :enabled end + # This hash contains whether the buy button is enabled. sig { returns(BuyButton) } attr_reader :buy_button + # This hash contains whether the Payment Element is enabled and the features it supports. sig { returns(PaymentElement) } attr_reader :payment_element + # This hash contains whether the pricing table is enabled. sig { returns(PricingTable) } attr_reader :pricing_table end - sig { returns(String) } # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. # # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + sig { returns(String) } attr_reader :client_secret - sig { returns(Components) } + # Configuration for the components supported by this Customer Session. + sig { returns(Components) } attr_reader :components - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.any(String, Stripe::Customer)) } + # The Customer the Customer Session was created for. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(Integer) } + # The timestamp at which this Customer Session will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/discount.rbi b/rbi/stripe/resources/discount.rbi index cc007e93d..6d06f1a41 100644 --- a/rbi/stripe/resources/discount.rbi +++ b/rbi/stripe/resources/discount.rbi @@ -8,46 +8,58 @@ module Stripe # # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) class Discount < StripeObject - sig { returns(T.nilable(String)) } # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + sig { returns(T.nilable(String)) } attr_reader :checkout_session - sig { returns(Stripe::Coupon) } + # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + sig { returns(Stripe::Coupon) } attr_reader :coupon - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer associated with this discount. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(Integer)) } + # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + sig { returns(T.nilable(Integer)) } attr_reader :end - sig { returns(String) } + # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. - attr_reader :invoice sig { returns(T.nilable(String)) } + attr_reader :invoice + # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + sig { returns(T.nilable(String)) } attr_reader :invoice_item - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + # The promotion code applied to create this discount. + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code - sig { returns(Integer) } + # Date that the coupon was applied. + sig { returns(Integer) } attr_reader :start - sig { returns(T.nilable(String)) } + # The subscription that this coupon is applied to, if it is applied to a particular subscription. - attr_reader :subscription sig { returns(T.nilable(String)) } + attr_reader :subscription + # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + sig { returns(T.nilable(String)) } attr_reader :subscription_item - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/dispute.rbi b/rbi/stripe/resources/dispute.rbi index ea7e2266b..46c672c1c 100644 --- a/rbi/stripe/resources/dispute.rbi +++ b/rbi/stripe/resources/dispute.rbi @@ -14,242 +14,338 @@ module Stripe class VisaCompellingEvidence3 < Stripe::StripeObject class DisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # User Account ID used to log into business platform. Must be recognizable by the user. sig { returns(T.nilable(String)) } attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_id + # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip + # Categorization of disputed payment. sig { returns(T.nilable(String)) } attr_reader :merchandise_or_services + # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class PriorUndisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. sig { returns(String) } attr_reader :charge + # User Account ID used to log into business platform. Must be recognizable by the user. sig { returns(T.nilable(String)) } attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_id + # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip + # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(DisputedTransaction)) } attr_reader :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T::Array[PriorUndisputedTransaction]) } attr_reader :prior_undisputed_transactions end + # Attribute for field visa_compelling_evidence_3 sig { returns(VisaCompellingEvidence3) } attr_reader :visa_compelling_evidence_3 end + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. sig { returns(T.nilable(String)) } attr_reader :access_activity_log + # The billing address provided by the customer. sig { returns(T.nilable(String)) } attr_reader :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. sig { returns(T.nilable(String)) } attr_reader :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. sig { returns(T.nilable(String)) } attr_reader :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :customer_communication + # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address + # The name of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_name + # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. sig { returns(T.nilable(String)) } attr_reader :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. sig { returns(T.nilable(String)) } attr_reader :duplicate_charge_id + # Attribute for field enhanced_evidence sig { returns(EnhancedEvidence) } attr_reader :enhanced_evidence + # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. sig { returns(T.nilable(String)) } attr_reader :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. sig { returns(T.nilable(String)) } attr_reader :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. sig { returns(T.nilable(String)) } attr_reader :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. sig { returns(T.nilable(String)) } attr_reader :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. sig { returns(T.nilable(String)) } attr_reader :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :uncategorized_file + # Any additional evidence or statements. sig { returns(T.nilable(String)) } attr_reader :uncategorized_text end class EvidenceDetails < Stripe::StripeObject class EnhancedEligibility < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject + # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T::Array[String]) } attr_reader :required_actions + # Visa Compelling Evidence 3.0 eligibility status. sig { returns(String) } attr_reader :status end + # Attribute for field visa_compelling_evidence_3 sig { returns(VisaCompellingEvidence3) } attr_reader :visa_compelling_evidence_3 end + # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. sig { returns(T.nilable(Integer)) } attr_reader :due_by + # Attribute for field enhanced_eligibility sig { returns(EnhancedEligibility) } attr_reader :enhanced_eligibility + # Whether evidence has been staged for this dispute. sig { returns(T::Boolean) } attr_reader :has_evidence + # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. sig { returns(T::Boolean) } attr_reader :past_due + # The number of times evidence has been submitted. Typically, you may only submit evidence once. sig { returns(Integer) } attr_reader :submission_count end class PaymentMethodDetails < Stripe::StripeObject class AmazonPay < Stripe::StripeObject + # The AmazonPay dispute type, chargeback or claim sig { returns(T.nilable(String)) } attr_reader :dispute_type end class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand + # The type of dispute opened. Different case types may have varying fees and financial impact. sig { returns(String) } attr_reader :case_type + # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. sig { returns(T.nilable(String)) } attr_reader :network_reason_code end class Klarna < Stripe::StripeObject + # The reason for the dispute as defined by Klarna sig { returns(T.nilable(String)) } attr_reader :reason_code end class Paypal < Stripe::StripeObject + # The ID of the dispute in PayPal. sig { returns(T.nilable(String)) } attr_reader :case_id + # The reason for the dispute as defined by PayPal sig { returns(T.nilable(String)) } attr_reader :reason_code end + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Payment method type. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Array[Stripe::BalanceTransaction]) } + # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + sig { returns(T::Array[Stripe::BalanceTransaction]) } attr_reader :balance_transactions - sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge that's disputed. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T::Array[String]) } + # List of eligibility types that are included in `enhanced_evidence`. + sig { returns(T::Array[String]) } attr_reader :enhanced_eligibility_types - sig { returns(Evidence) } + # Attribute for field evidence + sig { returns(Evidence) } attr_reader :evidence - sig { returns(EvidenceDetails) } + # Attribute for field evidence_details + sig { returns(EvidenceDetails) } attr_reader :evidence_details - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. - attr_reader :is_charge_refundable sig { returns(T::Boolean) } + attr_reader :is_charge_refundable + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # Network-dependent reason code for the dispute. + sig { returns(T.nilable(String)) } attr_reader :network_reason_code - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent that's disputed. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details + sig { returns(PaymentMethodDetails) } attr_reader :payment_method_details - sig { returns(String) } + # Reason given by cardholder for 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`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). - attr_reader :reason sig { returns(String) } + attr_reader :reason + # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. + sig { returns(String) } attr_reader :status end end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/active_entitlement.rbi b/rbi/stripe/resources/entitlements/active_entitlement.rbi index a62340126..a63821be4 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement.rbi @@ -6,20 +6,24 @@ module Stripe module Entitlements # An active entitlement describes access to a feature for a customer. class ActiveEntitlement < APIResource - sig { returns(T.any(String, Stripe::Entitlements::Feature)) } # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + sig { returns(T.any(String, Stripe::Entitlements::Feature)) } attr_reader :feature - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # A unique key you provide as your own system identifier. This may be up to 80 characters. - attr_reader :lookup_key sig { returns(String) } + attr_reader :lookup_key + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi index 44b1d8031..7db89193f 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi @@ -6,17 +6,20 @@ module Stripe module Entitlements # A summary of a customer's active entitlements. class ActiveEntitlementSummary < APIResource - sig { returns(String) } # The customer that is entitled to this feature. + sig { returns(String) } attr_reader :customer - sig { returns(Stripe::ListObject) } + # The list of entitlements this customer has. + sig { returns(Stripe::ListObject) } attr_reader :entitlements - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/entitlements/feature.rbi b/rbi/stripe/resources/entitlements/feature.rbi index aecd2d91b..38a2c8da6 100644 --- a/rbi/stripe/resources/entitlements/feature.rbi +++ b/rbi/stripe/resources/entitlements/feature.rbi @@ -7,26 +7,32 @@ module Stripe # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. class Feature < APIResource - sig { returns(T::Boolean) } # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # A unique key you provide as your own system identifier. This may be up to 80 characters. + sig { returns(String) } attr_reader :lookup_key - sig { returns(T::Hash[String, String]) } + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The feature's name, for your own purpose, not meant to be displayable to the customer. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/ephemeral_key.rbi b/rbi/stripe/resources/ephemeral_key.rbi index 76524e224..49a40d4d4 100644 --- a/rbi/stripe/resources/ephemeral_key.rbi +++ b/rbi/stripe/resources/ephemeral_key.rbi @@ -4,23 +4,28 @@ # typed: true module Stripe class EphemeralKey < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created + # Time at which the key will expire. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :expires - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The key's secret. You can use this value to make authorized requests to the Stripe API. + sig { returns(String) } attr_reader :secret end end \ No newline at end of file diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi index 390290e2a..7cd1e0ee3 100644 --- a/rbi/stripe/resources/event.rbi +++ b/rbi/stripe/resources/event.rbi @@ -35,75 +35,99 @@ module Stripe # for 30 days. class Event < APIResource class Data < Stripe::StripeObject + # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. sig { returns(T::Hash[String, T.untyped]) } attr_reader :object + # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. sig { returns(T::Hash[String, T.untyped]) } attr_reader :previous_attributes end class Reason < Stripe::StripeObject class AutomationAction < Stripe::StripeObject class StripeSendWebhookCustomEvent < Stripe::StripeObject + # Set of key-value pairs attached to the action when creating an Automation. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :custom_data end + # Attribute for field stripe_send_webhook_custom_event sig { returns(StripeSendWebhookCustomEvent) } attr_reader :stripe_send_webhook_custom_event + # The trigger name of the automation that triggered this action. + # Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. sig { returns(String) } attr_reader :trigger + # The type of the `automation_action`. sig { returns(String) } attr_reader :type end class Request < Stripe::StripeObject + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. sig { returns(T.nilable(String)) } attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. sig { returns(T.nilable(String)) } attr_reader :idempotency_key end + # Attribute for field automation_action sig { returns(AutomationAction) } attr_reader :automation_action + # Attribute for field request sig { returns(Request) } attr_reader :request + # The type of the reason for the event. sig { returns(String) } attr_reader :type end class Request < Stripe::StripeObject + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. sig { returns(T.nilable(String)) } attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. sig { returns(T.nilable(String)) } attr_reader :idempotency_key end - sig { returns(String) } # The connected account that originates the event. + sig { returns(String) } attr_reader :account - sig { returns(T.nilable(String)) } + # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + sig { returns(T.nilable(String)) } attr_reader :api_version - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Data) } + # Attribute for field data + sig { returns(Data) } attr_reader :data - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + sig { returns(Integer) } attr_reader :pending_webhooks - sig { returns(T.nilable(Reason)) } + # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. + sig { returns(T.nilable(Reason)) } attr_reader :reason - sig { returns(T.nilable(Request)) } + # Information on the API request that triggers the event. + sig { returns(T.nilable(Request)) } attr_reader :request - sig { returns(String) } + # Description of the event (for example, `invoice.created` or `charge.refunded`). + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/exchange_rate.rbi b/rbi/stripe/resources/exchange_rate.rbi index f4510f618..10eccf63f 100644 --- a/rbi/stripe/resources/exchange_rate.rbi +++ b/rbi/stripe/resources/exchange_rate.rbi @@ -30,14 +30,16 @@ module Stripe # # *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* class ExchangeRate < APIResource - sig { returns(String) } # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, Float]) } + # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + sig { returns(T::Hash[String, Float]) } attr_reader :rates end end \ No newline at end of file diff --git a/rbi/stripe/resources/file.rbi b/rbi/stripe/resources/file.rbi index 0523f5149..d386a998a 100644 --- a/rbi/stripe/resources/file.rbi +++ b/rbi/stripe/resources/file.rbi @@ -11,38 +11,48 @@ module Stripe # # Related guide: [File upload guide](https://stripe.com/docs/file-upload) class File < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } + # The file expires and isn't available at this time in epoch seconds. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(T.nilable(String)) } + # The suitable name for saving the file to a filesystem. + sig { returns(T.nilable(String)) } attr_reader :filename - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(Stripe::ListObject)) } + # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :links - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + sig { returns(String) } attr_reader :purpose - sig { returns(Integer) } + # The size of the file object in bytes. + sig { returns(Integer) } attr_reader :size - sig { returns(T.nilable(String)) } + # A suitable title for the document. - attr_reader :title sig { returns(T.nilable(String)) } + attr_reader :title + # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). - attr_reader :type sig { returns(T.nilable(String)) } + attr_reader :type + # Use your live secret API key to download the file from this URL. + sig { returns(T.nilable(String)) } attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/file_link.rbi b/rbi/stripe/resources/file_link.rbi index d371d092b..1b77787d0 100644 --- a/rbi/stripe/resources/file_link.rbi +++ b/rbi/stripe/resources/file_link.rbi @@ -7,32 +7,40 @@ module Stripe # create a `FileLink`. `FileLink`s contain a URL that you can use to # retrieve the contents of the file without authentication. class FileLink < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Boolean) } + # Returns if the link is already expired. + sig { returns(T::Boolean) } attr_reader :expired - sig { returns(T.nilable(Integer)) } + # Time that the link expires. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(T.any(String, Stripe::File)) } + # The file object this link points to. + sig { returns(T.any(String, Stripe::File)) } attr_reader :file - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The publicly accessible URL to download the file. + sig { returns(T.nilable(String)) } attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account.rbi b/rbi/stripe/resources/financial_connections/account.rbi index 8162395c5..1f32fe8ad 100644 --- a/rbi/stripe/resources/financial_connections/account.rbi +++ b/rbi/stripe/resources/financial_connections/account.rbi @@ -7,116 +7,166 @@ module Stripe # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. class Account < APIResource class AccountHolder < Stripe::StripeObject + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer + # Type of account holder that this account belongs to. sig { returns(String) } attr_reader :type end class Balance < Stripe::StripeObject class Cash < Stripe::StripeObject + # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :available end class Credit < Stripe::StripeObject + # The credit that has been used by the account holder. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :used end + # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :as_of + # Attribute for field cash sig { returns(Cash) } attr_reader :cash + # Attribute for field credit sig { returns(Credit) } attr_reader :credit + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T::Hash[String, Integer]) } attr_reader :current + # The `type` of the balance. An additional hash is included on the balance with a name matching this value. sig { returns(String) } attr_reader :type end class BalanceRefresh < Stripe::StripeObject + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class InferredBalancesRefresh < Stripe::StripeObject + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class OwnershipRefresh < Stripe::StripeObject + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class TransactionRefresh < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end - sig { returns(T.nilable(AccountHolder)) } # The account holder that this account belongs to. + sig { returns(T.nilable(AccountHolder)) } attr_reader :account_holder - sig { returns(T.nilable(Balance)) } + # The most recent information about the account's balance. + sig { returns(T.nilable(Balance)) } attr_reader :balance - sig { returns(T.nilable(BalanceRefresh)) } + # The state of the most recent attempt to refresh the account balance. + sig { returns(T.nilable(BalanceRefresh)) } attr_reader :balance_refresh - sig { returns(String) } + # The type of the account. Account category is further divided in `subcategory`. + sig { returns(String) } attr_reader :category - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # A human-readable name that has been assigned to this account, either by the account holder or by the institution. + sig { returns(T.nilable(String)) } attr_reader :display_name - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(InferredBalancesRefresh)) } + # The state of the most recent attempt to refresh the account's inferred balance history. + sig { returns(T.nilable(InferredBalancesRefresh)) } attr_reader :inferred_balances_refresh - sig { returns(String) } + # The name of the institution that holds this account. + sig { returns(String) } attr_reader :institution_name - sig { returns(T.nilable(String)) } + # The last 4 digits of the account number. If present, this will be 4 numeric characters. + sig { returns(T.nilable(String)) } attr_reader :last4 - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) } + # The most recent information about the account's owners. + sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) } attr_reader :ownership - sig { returns(T.nilable(OwnershipRefresh)) } + # The state of the most recent attempt to refresh the account owners. + sig { returns(T.nilable(OwnershipRefresh)) } attr_reader :ownership_refresh - sig { returns(T.nilable(T::Array[String])) } + # The list of permissions granted by this account. + sig { returns(T.nilable(T::Array[String])) } attr_reader :permissions - sig { returns(String) } + # The status of the link to the account. - attr_reader :status sig { returns(String) } + attr_reader :status + # If `category` is `cash`, one of: # # - `checking` @@ -131,15 +181,19 @@ module Stripe # - `other` # # If `category` is `investment` or `other`, this will be `other`. + sig { returns(String) } attr_reader :subcategory - sig { returns(T.nilable(T::Array[String])) } + # The list of data refresh subscriptions requested on this account. + sig { returns(T.nilable(T::Array[String])) } attr_reader :subscriptions - sig { returns(T::Array[String]) } + # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + sig { returns(T::Array[String]) } attr_reader :supported_payment_method_types - sig { returns(T.nilable(TransactionRefresh)) } + # The state of the most recent attempt to refresh the account transactions. + sig { returns(T.nilable(TransactionRefresh)) } attr_reader :transaction_refresh end end diff --git a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi index 4c61210cc..4a2a09762 100644 --- a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +++ b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi @@ -6,21 +6,24 @@ module Stripe module FinancialConnections # A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. class AccountInferredBalance < APIResource - sig { returns(Integer) } # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. + sig { returns(Integer) } attr_reader :as_of - sig { returns(T::Hash[String, Integer]) } + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. # # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. # # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + sig { returns(T::Hash[String, Integer]) } attr_reader :current - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/financial_connections/account_owner.rbi b/rbi/stripe/resources/financial_connections/account_owner.rbi index cc68f2f8d..c80ba872f 100644 --- a/rbi/stripe/resources/financial_connections/account_owner.rbi +++ b/rbi/stripe/resources/financial_connections/account_owner.rbi @@ -6,29 +6,36 @@ module Stripe module FinancialConnections # Describes an owner of an account. class AccountOwner < StripeObject - sig { returns(T.nilable(String)) } # The email address of the owner. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The full name of the owner. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The ownership object that this owner belongs to. + sig { returns(String) } attr_reader :ownership - sig { returns(T.nilable(String)) } + # The raw phone number of the owner. - attr_reader :phone sig { returns(T.nilable(String)) } + attr_reader :phone + # The raw physical address of the owner. + sig { returns(T.nilable(String)) } attr_reader :raw_address - sig { returns(T.nilable(Integer)) } + # The timestamp of the refresh that updated this owner. + sig { returns(T.nilable(Integer)) } attr_reader :refreshed_at end end diff --git a/rbi/stripe/resources/financial_connections/account_ownership.rbi b/rbi/stripe/resources/financial_connections/account_ownership.rbi index 25918d1fa..6784a4477 100644 --- a/rbi/stripe/resources/financial_connections/account_ownership.rbi +++ b/rbi/stripe/resources/financial_connections/account_ownership.rbi @@ -6,17 +6,20 @@ module Stripe module FinancialConnections # Describes a snapshot of the owners of an account at a particular point in time. class AccountOwnership < StripeObject - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::ListObject) } + # A paginated list of owners for this account. + sig { returns(Stripe::ListObject) } attr_reader :owners end end diff --git a/rbi/stripe/resources/financial_connections/institution.rbi b/rbi/stripe/resources/financial_connections/institution.rbi index 3474fadef..ad1534ab3 100644 --- a/rbi/stripe/resources/financial_connections/institution.rbi +++ b/rbi/stripe/resources/financial_connections/institution.rbi @@ -8,53 +8,68 @@ module Stripe class Institution < APIResource class Features < Stripe::StripeObject class Balances < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class Ownership < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class PaymentMethod < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class Transactions < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end + # Attribute for field balances sig { returns(Balances) } attr_reader :balances + # Attribute for field ownership sig { returns(Ownership) } attr_reader :ownership + # Attribute for field payment_method sig { returns(PaymentMethod) } attr_reader :payment_method + # Attribute for field transactions sig { returns(Transactions) } attr_reader :transactions end - sig { returns(Features) } # Attribute for field features + sig { returns(Features) } attr_reader :features - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The name of this institution. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[String]) } + # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. + sig { returns(T::Array[String]) } attr_reader :routing_numbers - sig { returns(String) } + # The status of this institution in the Financial Connections authentication flow. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(String)) } + # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. + sig { returns(T.nilable(String)) } attr_reader :url end end diff --git a/rbi/stripe/resources/financial_connections/session.rbi b/rbi/stripe/resources/financial_connections/session.rbi index 11a654d5f..80457723f 100644 --- a/rbi/stripe/resources/financial_connections/session.rbi +++ b/rbi/stripe/resources/financial_connections/session.rbi @@ -7,75 +7,97 @@ module Stripe # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. class Session < APIResource class AccountHolder < Stripe::StripeObject + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer + # Type of account holder that this account belongs to. sig { returns(String) } attr_reader :type end class Filters < Stripe::StripeObject + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. sig { returns(T.nilable(T::Array[String])) } attr_reader :account_subcategories + # List of countries from which to filter accounts. sig { returns(T.nilable(T::Array[String])) } attr_reader :countries + # Stripe ID of the institution with which the customer should be directed to log in. sig { returns(String) } attr_reader :institution end class Limits < Stripe::StripeObject + # The number of accounts that can be linked in this Session. sig { returns(Integer) } attr_reader :accounts end class ManualEntry < Stripe::StripeObject; end class StatusDetails < Stripe::StripeObject class Cancelled < Stripe::StripeObject + # The reason for the Session being cancelled. sig { returns(String) } attr_reader :reason end + # Attribute for field cancelled sig { returns(Cancelled) } attr_reader :cancelled end - sig { returns(T.nilable(AccountHolder)) } # The account holder for whom accounts are collected in this session. + sig { returns(T.nilable(AccountHolder)) } attr_reader :account_holder - sig { returns(Stripe::ListObject) } + # The accounts that were collected as part of this Session. + sig { returns(Stripe::ListObject) } attr_reader :accounts - sig { returns(String) } + # A value that will be passed to the client to launch the authentication flow. + sig { returns(String) } attr_reader :client_secret - sig { returns(Filters) } + # Attribute for field filters + sig { returns(Filters) } attr_reader :filters - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Limits) } + # Attribute for field limits + sig { returns(Limits) } attr_reader :limits - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(ManualEntry) } + # Attribute for field manual_entry + sig { returns(ManualEntry) } attr_reader :manual_entry - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[String]) } + # Permissions requested for accounts collected during this session. + sig { returns(T::Array[String]) } attr_reader :permissions - sig { returns(T.nilable(T::Array[String])) } + # Data features requested to be retrieved upon account creation. + sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch - sig { returns(String) } + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - attr_reader :return_url sig { returns(String) } + attr_reader :return_url + # The current state of the session. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } + # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details end end diff --git a/rbi/stripe/resources/financial_connections/transaction.rbi b/rbi/stripe/resources/financial_connections/transaction.rbi index c5e6585d8..dba6d14b6 100644 --- a/rbi/stripe/resources/financial_connections/transaction.rbi +++ b/rbi/stripe/resources/financial_connections/transaction.rbi @@ -7,46 +7,59 @@ module Stripe # A Transaction represents a real transaction that affects a Financial Connections Account balance. class Transaction < APIResource class StatusTransitions < Stripe::StripeObject + # Time at which this transaction posted. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Time at which this transaction was voided. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :void_at end - sig { returns(String) } # The ID of the Financial Connections Account this transaction belongs to. + sig { returns(String) } attr_reader :account - sig { returns(Integer) } + # The amount of this transaction, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # The description of this transaction. - attr_reader :description sig { returns(String) } + attr_reader :description + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The status of the transaction. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(Integer) } + # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :transacted_at - sig { returns(String) } + # The token of the transaction refresh that last updated or created this transaction. + sig { returns(String) } attr_reader :transaction_refresh - sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated end end diff --git a/rbi/stripe/resources/forwarding/request.rbi b/rbi/stripe/resources/forwarding/request.rbi index 7f3373b2c..eb7db33fc 100644 --- a/rbi/stripe/resources/forwarding/request.rbi +++ b/rbi/stripe/resources/forwarding/request.rbi @@ -22,71 +22,93 @@ module Stripe # Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). class Request < APIResource class RequestContext < Stripe::StripeObject + # The time it took in milliseconds for the destination endpoint to respond. sig { returns(Integer) } attr_reader :destination_duration + # The IP address of the destination. sig { returns(String) } attr_reader :destination_ip_address end class RequestDetails < Stripe::StripeObject class Header < Stripe::StripeObject + # The header name. sig { returns(String) } attr_reader :name + # The header value. sig { returns(String) } attr_reader :value end + # The body payload to send to the destination endpoint. sig { returns(String) } attr_reader :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. sig { returns(T::Array[Header]) } attr_reader :headers + # The HTTP method used to call the destination endpoint. sig { returns(String) } attr_reader :http_method end class ResponseDetails < Stripe::StripeObject class Header < Stripe::StripeObject + # The header name. sig { returns(String) } attr_reader :name + # The header value. sig { returns(String) } attr_reader :value end + # The response body from the destination endpoint to Stripe. sig { returns(String) } attr_reader :body + # HTTP headers that the destination endpoint returned. sig { returns(T::Array[Header]) } attr_reader :headers + # The HTTP status code that the destination endpoint returned. sig { returns(Integer) } attr_reader :status end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + sig { returns(String) } attr_reader :payment_method - sig { returns(T::Array[String]) } + # The field kinds to be replaced in the forwarded request. + sig { returns(T::Array[String]) } attr_reader :replacements - sig { returns(T.nilable(RequestContext)) } + # Context about the request from Stripe's servers to the destination endpoint. + sig { returns(T.nilable(RequestContext)) } attr_reader :request_context - sig { returns(T.nilable(RequestDetails)) } + # The request that was sent to the destination endpoint. We redact any sensitive fields. + sig { returns(T.nilable(RequestDetails)) } attr_reader :request_details - sig { returns(T.nilable(ResponseDetails)) } + # The response that the destination endpoint returned to us. We redact any sensitive fields. + sig { returns(T.nilable(ResponseDetails)) } attr_reader :response_details - sig { returns(T.nilable(String)) } + # The destination URL for the forwarded request. Must be supported by the config. + sig { returns(T.nilable(String)) } attr_reader :url end end diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi index 3facb2f9e..2dc445660 100644 --- a/rbi/stripe/resources/funding_instructions.rbi +++ b/rbi/stripe/resources/funding_instructions.rbi @@ -13,172 +13,242 @@ module Stripe class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The ABA account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The ABA routing number sig { returns(String) } attr_reader :routing_number end class Iban < Stripe::StripeObject + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # The IBAN of the account. sig { returns(String) } attr_reader :iban end class SortCode < Stripe::StripeObject + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject + # The three-digit bank code sig { returns(String) } attr_reader :bank_code + # The short banking institution name sig { returns(String) } attr_reader :bank_name + # The CLABE number sig { returns(String) } attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The SWIFT code sig { returns(String) } attr_reader :swift_code end class Zengin < Stripe::StripeObject + # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name + # The account number sig { returns(T.nilable(String)) } attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type + # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code + # The bank name of the account sig { returns(T.nilable(String)) } attr_reader :bank_name + # The branch code of the account sig { returns(T.nilable(String)) } attr_reader :branch_code + # The branch name of the account sig { returns(T.nilable(String)) } attr_reader :branch_name end + # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. sig { returns(Iban) } attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. sig { returns(SortCode) } attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. sig { returns(Spei) } attr_reader :spei + # The payment networks supported by this FinancialAddress sig { returns(T::Array[String]) } attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. sig { returns(Swift) } attr_reader :swift + # The type of financial address sig { returns(String) } attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. sig { returns(Zengin) } attr_reader :zengin end + # The country of the bank account to fund sig { returns(String) } attr_reader :country + # A list of financial addresses that can be used to fund a particular balance sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses + # The bank_transfer type sig { returns(String) } attr_reader :type end - sig { returns(BankTransfer) } # Attribute for field bank_transfer + sig { returns(BankTransfer) } attr_reader :bank_transfer - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # The `funding_type` of the returned instructions + sig { returns(String) } attr_reader :funding_type - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/gift_cards/card.rbi b/rbi/stripe/resources/gift_cards/card.rbi index 066816800..e5dd29202 100644 --- a/rbi/stripe/resources/gift_cards/card.rbi +++ b/rbi/stripe/resources/gift_cards/card.rbi @@ -9,62 +9,81 @@ module Stripe class Card < APIResource class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject + # The Stripe CheckoutSession that created this object. sig { returns(String) } attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item end class Order < Stripe::StripeObject + # The Stripe Order LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item + # The Stripe Order that created this object. sig { returns(String) } attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. sig { returns(String) } attr_reader :payment_intent end + # Attribute for field checkout sig { returns(Checkout) } attr_reader :checkout + # Attribute for field order sig { returns(Order) } attr_reader :order + # Attribute for field payment sig { returns(Payment) } attr_reader :payment + # The type of event that created this object. sig { returns(String) } attr_reader :type end - sig { returns(T::Boolean) } # Whether this gift card can be used or not. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } + # The amount of funds available for new transactions. - attr_reader :amount_available sig { returns(Integer) } + attr_reader :amount_available + # The amount of funds marked as held. + sig { returns(Integer) } attr_reader :amount_held - sig { returns(T.nilable(String)) } + # Code used to redeem this gift card. + sig { returns(T.nilable(String)) } attr_reader :code - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CreatedBy)) } + # The related Stripe objects that created this gift card. + sig { returns(T.nilable(CreatedBy)) } attr_reader :created_by - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::ListObject) } + # Transactions on this gift card. + sig { returns(Stripe::ListObject) } attr_reader :transactions end end diff --git a/rbi/stripe/resources/gift_cards/transaction.rbi b/rbi/stripe/resources/gift_cards/transaction.rbi index 8d486f84d..e85e2294b 100644 --- a/rbi/stripe/resources/gift_cards/transaction.rbi +++ b/rbi/stripe/resources/gift_cards/transaction.rbi @@ -13,65 +13,85 @@ module Stripe class Transaction < APIResource class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject + # The Stripe CheckoutSession that created this object. sig { returns(String) } attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item end class Order < Stripe::StripeObject + # The Stripe Order LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item + # The Stripe Order that created this object. sig { returns(String) } attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. sig { returns(String) } attr_reader :payment_intent end + # Attribute for field checkout sig { returns(Checkout) } attr_reader :checkout + # Attribute for field order sig { returns(Order) } attr_reader :order + # Attribute for field payment sig { returns(Payment) } attr_reader :payment + # The type of event that created this object. sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(Integer)) } # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. - attr_reader :amount sig { returns(T.nilable(Integer)) } + attr_reader :amount + # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. - attr_reader :confirmed_at sig { returns(T.nilable(Integer)) } + attr_reader :confirmed_at + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :created - sig { returns(T.nilable(CreatedBy)) } + # The related Stripe objects that created this gift card transaction. + sig { returns(T.nilable(CreatedBy)) } attr_reader :created_by - sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(T.nilable(String)) } + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description sig { returns(T.nilable(String)) } + attr_reader :description + # The gift card that this transaction occurred on + sig { returns(T.nilable(String)) } attr_reader :gift_card - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # Status of this transaction, one of `held`, `confirmed`, or `canceled`. - attr_reader :status sig { returns(T.nilable(String)) } + attr_reader :status + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(T.nilable(String)) } attr_reader :transfer_group end end diff --git a/rbi/stripe/resources/identity/verification_report.rbi b/rbi/stripe/resources/identity/verification_report.rbi index aa18b876f..0fe1c84c5 100644 --- a/rbi/stripe/resources/identity/verification_report.rbi +++ b/rbi/stripe/resources/identity/verification_report.rbi @@ -18,206 +18,282 @@ module Stripe class VerificationReport < APIResource class Document < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Dob < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end class ExpirationDate < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class IssuedDate < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end + # Address as it appears in the document. sig { returns(T.nilable(Address)) } attr_reader :address + # Date of birth as it appears in the document. sig { returns(T.nilable(Dob)) } attr_reader :dob + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # Expiration date of the document. sig { returns(T.nilable(ExpirationDate)) } attr_reader :expiration_date + # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. sig { returns(T.nilable(T::Array[String])) } attr_reader :files + # First name as it appears in the document. sig { returns(T.nilable(String)) } attr_reader :first_name + # Issued date of the document. sig { returns(T.nilable(IssuedDate)) } attr_reader :issued_date + # Issuing country of the document. sig { returns(T.nilable(String)) } attr_reader :issuing_country + # Last name as it appears in the document. sig { returns(T.nilable(String)) } attr_reader :last_name + # Document ID number. sig { returns(T.nilable(String)) } attr_reader :number + # Status of this `document` check. sig { returns(String) } attr_reader :status + # Type of the document. sig { returns(T.nilable(String)) } attr_reader :type end class Email < Stripe::StripeObject class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # Email to be verified. sig { returns(T.nilable(String)) } attr_reader :email + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # Status of this `email` check. sig { returns(String) } attr_reader :status end class IdNumber < Stripe::StripeObject class Dob < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # Date of birth. sig { returns(T.nilable(Dob)) } attr_reader :dob + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # First name. sig { returns(T.nilable(String)) } attr_reader :first_name + # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. sig { returns(T.nilable(String)) } attr_reader :id_number + # Type of ID number. sig { returns(T.nilable(String)) } attr_reader :id_number_type + # Last name. sig { returns(T.nilable(String)) } attr_reader :last_name + # Status of this `id_number` check. sig { returns(String) } attr_reader :status end class Options < Stripe::StripeObject class Document < Stripe::StripeObject + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. sig { returns(T::Array[String]) } attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. sig { returns(T::Boolean) } attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. sig { returns(T::Boolean) } attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). sig { returns(T::Boolean) } attr_reader :require_matching_selfie end class IdNumber < Stripe::StripeObject; end + # Attribute for field document sig { returns(Document) } attr_reader :document + # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number end class Phone < Stripe::StripeObject class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # Phone to be verified. sig { returns(T.nilable(String)) } attr_reader :phone + # Status of this `phone` check. sig { returns(String) } attr_reader :status end class Selfie < Stripe::StripeObject class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. sig { returns(T.nilable(String)) } attr_reader :document + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. sig { returns(T.nilable(String)) } attr_reader :selfie + # Status of this `selfie` check. sig { returns(String) } attr_reader :status end - sig { returns(T.nilable(String)) } # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(T.nilable(String)) } attr_reader :client_reference_id - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Document) } + # Result from a document check + sig { returns(Document) } attr_reader :document - sig { returns(Email) } + # Result from a email check + sig { returns(Email) } attr_reader :email - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(IdNumber) } + # Result from an id_number check + sig { returns(IdNumber) } attr_reader :id_number - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Options) } + # Attribute for field options + sig { returns(Options) } attr_reader :options - sig { returns(Phone) } + # Result from a phone check + sig { returns(Phone) } attr_reader :phone - sig { returns(Selfie) } + # Result from a selfie check + sig { returns(Selfie) } attr_reader :selfie - sig { returns(String) } + # Type of report. - attr_reader :type sig { returns(String) } + attr_reader :type + # The configuration token of a verification flow from the dashboard. + sig { returns(String) } attr_reader :verification_flow - sig { returns(T.nilable(String)) } + # ID of the VerificationSession that created this report. + sig { returns(T.nilable(String)) } attr_reader :verification_session end end diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi index a6bb69001..2f62e5562 100644 --- a/rbi/stripe/resources/identity/verification_session.rbi +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -17,143 +17,192 @@ module Stripe # Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) class VerificationSession < APIResource class LastError < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification or user-session failure. sig { returns(T.nilable(String)) } attr_reader :code + # A message that explains the reason for verification or user-session failure. sig { returns(T.nilable(String)) } attr_reader :reason end class Options < Stripe::StripeObject class Document < Stripe::StripeObject + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. sig { returns(T::Array[String]) } attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. sig { returns(T::Boolean) } attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. sig { returns(T::Boolean) } attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). sig { returns(T::Boolean) } attr_reader :require_matching_selfie end class Email < Stripe::StripeObject + # Request one time password verification of `provided_details.email`. sig { returns(T::Boolean) } attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end class Phone < Stripe::StripeObject + # Request one time password verification of `provided_details.phone`. sig { returns(T::Boolean) } attr_reader :require_verification end + # Attribute for field document sig { returns(Document) } attr_reader :document + # Attribute for field email sig { returns(Email) } attr_reader :email + # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number + # Attribute for field phone sig { returns(Phone) } attr_reader :phone end class ProvidedDetails < Stripe::StripeObject + # Email of user being verified sig { returns(String) } attr_reader :email + # Phone number of user being verified sig { returns(String) } attr_reader :phone end class Redaction < Stripe::StripeObject + # Indicates whether this object and its related objects have been redacted or not. sig { returns(String) } attr_reader :status end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Dob < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end + # The user's verified address. sig { returns(T.nilable(Address)) } attr_reader :address + # The user’s verified date of birth. sig { returns(T.nilable(Dob)) } attr_reader :dob + # The user's verified email address sig { returns(T.nilable(String)) } attr_reader :email + # The user's verified first name. sig { returns(T.nilable(String)) } attr_reader :first_name + # The user's verified id number. sig { returns(T.nilable(String)) } attr_reader :id_number + # The user's verified id number type. sig { returns(T.nilable(String)) } attr_reader :id_number_type + # The user's verified last name. sig { returns(T.nilable(String)) } attr_reader :last_name + # The user's verified phone number sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(T.nilable(String)) } # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - attr_reader :client_reference_id sig { returns(T.nilable(String)) } + attr_reader :client_reference_id + # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastError)) } + # If present, this property tells you the last error encountered when processing the verification. + sig { returns(T.nilable(LastError)) } attr_reader :last_error - sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) } + # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) } attr_reader :last_verification_report - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Options)) } + # A set of options for the session’s verification checks. + sig { returns(T.nilable(Options)) } attr_reader :options - sig { returns(T.nilable(ProvidedDetails)) } + # Details provided about the user being verified. These details may be shown to the user. + sig { returns(T.nilable(ProvidedDetails)) } attr_reader :provided_details - sig { returns(T.nilable(Redaction)) } + # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + sig { returns(T.nilable(Redaction)) } attr_reader :redaction - sig { returns(T.nilable(String)) } + # Token referencing a Customer resource. + sig { returns(T.nilable(String)) } attr_reader :related_customer - sig { returns(String) } + # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). - attr_reader :status sig { returns(String) } + attr_reader :status + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } + # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + sig { returns(T.nilable(String)) } attr_reader :url - sig { returns(String) } + # The configuration token of a verification flow from the dashboard. + sig { returns(String) } attr_reader :verification_flow - sig { returns(T.nilable(VerifiedOutputs)) } + # The user’s verified data. + sig { returns(T.nilable(VerifiedOutputs)) } attr_reader :verified_outputs end end diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index fc3893eb0..78babc005 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -37,126 +37,211 @@ module Stripe # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) class Invoice < APIResource class AmountsDue < Stripe::StripeObject + # Incremental amount due for this payment in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. sig { returns(Integer) } attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Date on which a payment plan’s payment is due. sig { returns(T.nilable(Integer)) } attr_reader :due_date + # Timestamp when the payment was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` sig { returns(String) } attr_reader :status end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. sig { returns(T.nilable(String)) } attr_reader :status end class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class CustomerAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end class FromInvoice < Stripe::StripeObject + # The relation between this invoice and the cloned invoice sig { returns(String) } attr_reader :action + # The invoice that was cloned. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class LastFinalizationError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end @@ -164,41 +249,53 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end + # Attribute for field installments sig { returns(Installments) } attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -208,234 +305,323 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Card)) } attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Konbini)) } attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. sig { returns(T.nilable(String)) } attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. sig { returns(T.nilable(String)) } attr_reader :page_size end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display + # Invoice pdf rendering options sig { returns(T.nilable(Pdf)) } attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. sig { returns(T.nilable(String)) } attr_reader :template + # Version of the rendering template that the invoice is using. sig { returns(T.nilable(Integer)) } attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject + # The time that the invoice draft was finalized. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at + # The time that the invoice was marked uncollectible. sig { returns(T.nilable(Integer)) } attr_reader :marked_uncollectible_at + # The time that the invoice was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The time that the invoice was voided. sig { returns(T.nilable(Integer)) } attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior + # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject + # The IDs of the line items that triggered the threshold invoice. sig { returns(T::Array[String]) } attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. sig { returns(Integer) } attr_reader :usage_gte end + # The total invoice amount threshold boundary if it triggered the threshold invoice. sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. sig { returns(T::Array[ItemReason]) } attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TotalTaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T.nilable(String)) } # The country of the business associated with this invoice, most often the business creating the invoice. - attr_reader :account_country sig { returns(T.nilable(String)) } + attr_reader :account_country + # The public name of the business associated with this invoice, most often the business creating the invoice. + sig { returns(T.nilable(String)) } attr_reader :account_name - sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - sig { returns(Integer) } + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. - attr_reader :amount_due sig { returns(Integer) } + attr_reader :amount_due + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. - attr_reader :amount_overpaid sig { returns(Integer) } + attr_reader :amount_overpaid + # The amount, in cents (or local equivalent), that was paid. - attr_reader :amount_paid sig { returns(Integer) } + attr_reader :amount_paid + # The difference between amount_due and amount_paid, in cents (or local equivalent). - attr_reader :amount_remaining sig { returns(Integer) } + attr_reader :amount_remaining + # This is the sum of all the shipping amounts. + sig { returns(Integer) } attr_reader :amount_shipping - sig { returns(T.nilable(T::Array[AmountsDue])) } + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + sig { returns(T.nilable(T::Array[AmountsDue])) } attr_reader :amounts_due - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the invoice. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(Integer) } + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + sig { returns(Integer) } attr_reader :attempt_count - sig { returns(T::Boolean) } + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. - attr_reader :attempted sig { returns(T::Boolean) } + attr_reader :attempted + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + sig { returns(T::Boolean) } attr_reader :auto_advance - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(Integer)) } + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + sig { returns(T.nilable(Integer)) } attr_reader :automatically_finalizes_at - sig { returns(T.nilable(String)) } + # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -445,227 +631,301 @@ module Stripe # * `subscription_threshold`: A subscription reached a billing threshold. # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + sig { returns(T.nilable(String)) } attr_reader :billing_reason - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the latest charge generated for this invoice, if any. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + sig { returns(String) } attr_reader :collection_method - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T::Array[CustomField])) } + # Custom fields displayed on the invoice. + sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer who will be billed. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(CustomerAddress)) } + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerAddress)) } attr_reader :customer_address - sig { returns(T.nilable(String)) } + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_email sig { returns(T.nilable(String)) } + attr_reader :customer_email + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_name sig { returns(T.nilable(String)) } + attr_reader :customer_name + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_phone - sig { returns(T.nilable(CustomerShipping)) } + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerShipping)) } attr_reader :customer_shipping - sig { returns(T.nilable(String)) } + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_tax_exempt - sig { returns(T.nilable(T::Array[CustomerTaxId])) } + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(T::Array[CustomerTaxId])) } attr_reader :customer_tax_ids - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :default_margins - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates applied to this invoice, if any. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(T.nilable(Integer)) } + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. - attr_reader :due_date sig { returns(T.nilable(Integer)) } + attr_reader :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - attr_reader :effective_at sig { returns(T.nilable(Integer)) } + attr_reader :effective_at + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(Integer)) } attr_reader :ending_balance - sig { returns(T.nilable(String)) } + # Footer displayed on the invoice. + sig { returns(T.nilable(String)) } attr_reader :footer - sig { returns(T.nilable(FromInvoice)) } + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + sig { returns(T.nilable(FromInvoice)) } attr_reader :from_invoice - sig { returns(T.nilable(String)) } + # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(String)) } attr_reader :hosted_invoice_url - sig { returns(String) } + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(String)) } attr_reader :invoice_pdf - sig { returns(Issuer) } + # Attribute for field issuer + sig { returns(Issuer) } attr_reader :issuer - sig { returns(T.nilable(LastFinalizationError)) } + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + sig { returns(T.nilable(LastFinalizationError)) } attr_reader :last_finalization_error - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the most recent non-draft revision of this invoice + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :latest_revision - sig { returns(Stripe::ListObject) } + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + sig { returns(Stripe::ListObject) } attr_reader :lines - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(Integer)) } + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(Integer)) } attr_reader :next_payment_attempt - sig { returns(T.nilable(String)) } + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + sig { returns(T.nilable(String)) } attr_reader :number - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T::Boolean) } + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. - attr_reader :paid sig { returns(T::Boolean) } + attr_reader :paid + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + sig { returns(T::Boolean) } attr_reader :paid_out_of_band - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(PaymentSettings) } + # Attribute for field payment_settings + sig { returns(PaymentSettings) } attr_reader :payment_settings - sig { returns(Stripe::ListObject) } + # Payments for this invoice + sig { returns(Stripe::ListObject) } attr_reader :payments - sig { returns(Integer) } + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_end sig { returns(Integer) } + attr_reader :period_end + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_start sig { returns(Integer) } + attr_reader :period_start + # Total amount of all post-payment credit notes issued for this invoice. - attr_reader :post_payment_credit_notes_amount sig { returns(Integer) } + attr_reader :post_payment_credit_notes_amount + # Total amount of all pre-payment credit notes issued for this invoice. + sig { returns(Integer) } attr_reader :pre_payment_credit_notes_amount - sig { returns(T.nilable(T.any(String, Stripe::Quote))) } + # The quote this invoice was generated from. + sig { returns(T.nilable(T.any(String, Stripe::Quote))) } attr_reader :quote - sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this invoice. + sig { returns(T.nilable(String)) } attr_reader :receipt_number - sig { returns(T.nilable(Rendering)) } + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(T.nilable(Rendering)) } attr_reader :rendering - sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied on the invoice. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(Integer) } + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + sig { returns(Integer) } attr_reader :starting_balance - sig { returns(T.nilable(String)) } + # Extra information about an invoice for the customer's credit card statement. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that this invoice was prepared for, if any. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(SubscriptionDetails)) } + # Details about the subscription that created this invoice. + sig { returns(T.nilable(SubscriptionDetails)) } attr_reader :subscription_details - sig { returns(Integer) } + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. - attr_reader :subscription_proration_date sig { returns(Integer) } + attr_reader :subscription_proration_date + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + sig { returns(Integer) } attr_reader :subtotal - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated - attr_reader :subtotal_excluding_tax sig { returns(T.nilable(Integer)) } + attr_reader :subtotal_excluding_tax + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + sig { returns(T.nilable(Integer)) } attr_reader :tax - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(ThresholdReason) } + # Attribute for field threshold_reason + sig { returns(ThresholdReason) } attr_reader :threshold_reason - sig { returns(Integer) } + # Total after discounts and taxes. + sig { returns(Integer) } attr_reader :total - sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } + # The aggregate amounts calculated per discount across all line items. + sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } attr_reader :total_discount_amounts - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + sig { returns(T.nilable(Integer)) } attr_reader :total_excluding_tax - sig { returns(T.nilable(T::Array[TotalMarginAmount])) } + # The aggregate amounts calculated per margin across all line items. + sig { returns(T.nilable(T::Array[TotalMarginAmount])) } attr_reader :total_margin_amounts - sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } attr_reader :total_pretax_credit_amounts - sig { returns(T::Array[TotalTaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. + sig { returns(T::Array[TotalTaxAmount]) } attr_reader :total_tax_amounts - sig { returns(T.nilable(TransferData)) } + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(Integer)) } + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + sig { returns(T.nilable(Integer)) } attr_reader :webhooks_delivered_at - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi index d0c0fc11a..47538c6b2 100644 --- a/rbi/stripe/resources/invoice_item.rbi +++ b/rbi/stripe/resources/invoice_item.rbi @@ -16,85 +16,111 @@ module Stripe # Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). class InvoiceItem < APIResource class Period < Stripe::StripeObject + # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end + # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end - sig { returns(Integer) } # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } + # The ID of the customer who will be billed when this invoice item is billed. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :date - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Boolean) } + # If true, discounts will apply to this invoice item. Always false for prorations. + sig { returns(T::Boolean) } attr_reader :discountable - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } + # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } attr_reader :discounts - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the invoice this invoice item belongs to. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :margins - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Period) } + # Attribute for field period + sig { returns(Period) } attr_reader :period - sig { returns(T.nilable(Stripe::Plan)) } + # If the invoice item is a proration, the plan of the subscription that the proration was computed for. + sig { returns(T.nilable(Stripe::Plan)) } attr_reader :plan - sig { returns(T.nilable(Stripe::Price)) } + # The price of the invoice item. + sig { returns(T.nilable(Stripe::Price)) } attr_reader :price - sig { returns(T::Boolean) } + # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + sig { returns(T::Boolean) } attr_reader :proration - sig { returns(Integer) } + # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + sig { returns(Integer) } attr_reader :quantity - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that this invoice item has been created for, if any. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(String) } + # The subscription item that this invoice item has been created for, if any. + sig { returns(String) } attr_reader :subscription_item - sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice item belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T.nilable(Integer)) } + # Unit amount (in the `currency` specified) of the invoice item. + sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - sig { returns(T.nilable(String)) } + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi index 8c587d7b9..c580f5e39 100644 --- a/rbi/stripe/resources/invoice_line_item.rbi +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -8,140 +8,186 @@ module Stripe # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). class InvoiceLineItem < StripeObject class DiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class MarginAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class Period < Stripe::StripeObject + # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end + # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end class PretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject + # Invoice containing the credited invoice line items sig { returns(String) } attr_reader :invoice + # Credited invoice line items sig { returns(T::Array[String]) } attr_reader :invoice_line_items end + # For a credit proration `line_item`, the original debit line_items to which the credit proration applies. sig { returns(T.nilable(CreditedItems)) } attr_reader :credited_items end class TaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # The amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. + sig { returns(T.nilable(Integer)) } attr_reader :amount_excluding_tax - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T::Array[DiscountAmount])) } + # The amount of discount calculated per discount for this line item. + sig { returns(T.nilable(T::Array[DiscountAmount])) } attr_reader :discount_amounts - sig { returns(T::Boolean) } + # If true, discounts will apply to this line item. Always false for prorations. + sig { returns(T::Boolean) } attr_reader :discountable - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The ID of the invoice that contains this line item. + sig { returns(T.nilable(String)) } attr_reader :invoice - sig { returns(T.any(String, Stripe::InvoiceItem)) } + # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. + sig { returns(T.any(String, Stripe::InvoiceItem)) } attr_reader :invoice_item - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Array[MarginAmount])) } + # The amount of margin calculated per margin for this line item. + sig { returns(T.nilable(T::Array[MarginAmount])) } attr_reader :margin_amounts - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :margins - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Period) } + # Attribute for field period + sig { returns(Period) } attr_reader :period - sig { returns(T.nilable(Stripe::Plan)) } + # The plan of the subscription, if the line item is a subscription or a proration. + sig { returns(T.nilable(Stripe::Plan)) } attr_reader :plan - sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } attr_reader :pretax_credit_amounts - sig { returns(T.nilable(Stripe::Price)) } + # The price of the line item. + sig { returns(T.nilable(Stripe::Price)) } attr_reader :price - sig { returns(T::Boolean) } + # Whether this is a proration. + sig { returns(T::Boolean) } attr_reader :proration - sig { returns(T.nilable(ProrationDetails)) } + # Additional details for proration line items + sig { returns(T.nilable(ProrationDetails)) } attr_reader :proration_details - sig { returns(T.nilable(Integer)) } + # The quantity of the subscription, if the line item is a subscription or a proration. + sig { returns(T.nilable(Integer)) } attr_reader :quantity - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that the invoice item pertains to, if any. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.any(String, Stripe::SubscriptionItem)) } + # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + sig { returns(T.any(String, Stripe::SubscriptionItem)) } attr_reader :subscription_item - sig { returns(T::Array[TaxAmount]) } + # The amount of tax calculated per tax rate for this line item + sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts - sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates which apply to the line item. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :tax_rates - sig { returns(String) } + # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } + # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_excluding_tax end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_payment.rbi b/rbi/stripe/resources/invoice_payment.rbi index 4dccf0f92..974f0ae23 100644 --- a/rbi/stripe/resources/invoice_payment.rbi +++ b/rbi/stripe/resources/invoice_payment.rbi @@ -6,59 +6,77 @@ module Stripe # The invoice payment object class InvoicePayment < APIResource class Payment < Stripe::StripeObject + # ID of the successful charge for this payment when `type` is `charge`. sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge + # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # ID of the PaymentRecord associated with this payment when `type` is `payment_record`. sig { returns(T.any(String, Stripe::PaymentRecord)) } attr_reader :payment_record + # Type of payment object associated with this invoice payment. sig { returns(String) } attr_reader :type end class StatusTransitions < Stripe::StripeObject + # The time that the payment was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # The time that the payment succeeded. sig { returns(T.nilable(Integer)) } attr_reader :paid_at end - sig { returns(T.nilable(Integer)) } # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. - attr_reader :amount_overpaid sig { returns(T.nilable(Integer)) } + attr_reader :amount_overpaid + # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + sig { returns(T.nilable(Integer)) } attr_reader :amount_paid - sig { returns(Integer) } + # Amount intended to be paid toward this invoice, in cents (or local equivalent) - attr_reader :amount_requested sig { returns(Integer) } + attr_reader :amount_requested + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.any(String, Stripe::Invoice)) } + # The invoice that was paid. + sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - sig { returns(T.nilable(T::Boolean)) } + # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + sig { returns(T.nilable(T::Boolean)) } attr_reader :is_default - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Payment) } + # Attribute for field payment + sig { returns(Payment) } attr_reader :payment - sig { returns(String) } + # The status of the payment, one of `open`, `paid`, or `canceled`. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_rendering_template.rbi b/rbi/stripe/resources/invoice_rendering_template.rbi index 5f2c3e939..a48e8dec9 100644 --- a/rbi/stripe/resources/invoice_rendering_template.rbi +++ b/rbi/stripe/resources/invoice_rendering_template.rbi @@ -6,29 +6,36 @@ module Stripe # Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates # can be created from within the Dashboard, and they can be used over the API when creating invoices. class InvoiceRenderingTemplate < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # A brief description of the template, hidden from customers + sig { returns(T.nilable(String)) } attr_reader :nickname - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The status of the template, one of `active` or `archived`. + sig { returns(String) } attr_reader :status - sig { returns(Integer) } + # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + sig { returns(Integer) } attr_reader :version end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi index 5748c28e2..394dd8bbe 100644 --- a/rbi/stripe/resources/issuing/authorization.rbi +++ b/rbi/stripe/resources/issuing/authorization.rbi @@ -11,281 +11,385 @@ module Stripe # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) class Authorization < APIResource class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject + # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. sig { returns(T.nilable(String)) } attr_reader :alphanumeric_id + # Driver ID. sig { returns(T.nilable(String)) } attr_reader :driver_id + # Odometer reading. sig { returns(T.nilable(Integer)) } attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. sig { returns(T.nilable(String)) } attr_reader :unspecified_id + # User ID. sig { returns(T.nilable(String)) } attr_reader :user_id + # Vehicle number. sig { returns(T.nilable(String)) } attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject + # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :national_amount_decimal end + # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. sig { returns(T.nilable(NonFuel)) } attr_reader :non_fuel + # Information about tax included in this transaction. sig { returns(T.nilable(Tax)) } attr_reader :tax end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { returns(T.nilable(CardholderPromptData)) } attr_reader :cardholder_prompt_data + # The type of purchase. sig { returns(T.nilable(String)) } attr_reader :purchase_type + # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. sig { returns(T.nilable(ReportedBreakdown)) } attr_reader :reported_breakdown + # The type of fuel service. sig { returns(T.nilable(String)) } attr_reader :service_type end class FraudChallenge < Stripe::StripeObject + # The method by which the fraud challenge was delivered to the cardholder. sig { returns(String) } attr_reader :channel + # The status of the fraud challenge. sig { returns(String) } attr_reader :status + # If the challenge is not deliverable, the reason why. sig { returns(T.nilable(String)) } attr_reader :undeliverable_reason end class Fuel < Stripe::StripeObject + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. sig { returns(T.nilable(String)) } attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :quantity_decimal + # The type of fuel that was purchased. sig { returns(T.nilable(String)) } attr_reader :type + # The units for `quantity_decimal`. sig { returns(T.nilable(String)) } attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_cost_decimal end class MerchantData < Stripe::StripeObject + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. sig { returns(String) } attr_reader :category + # The merchant category code for the seller’s business sig { returns(String) } attr_reader :category_code + # City where the seller is located sig { returns(T.nilable(String)) } attr_reader :city + # Country where the seller is located sig { returns(T.nilable(String)) } attr_reader :country + # Name of the seller sig { returns(T.nilable(String)) } attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. sig { returns(String) } attr_reader :network_id + # Postal code where the seller is located sig { returns(T.nilable(String)) } attr_reader :postal_code + # State where the seller is located sig { returns(T.nilable(String)) } attr_reader :state + # An ID assigned by the seller to the location of the sale. sig { returns(T.nilable(String)) } attr_reader :terminal_id + # URL provided by the merchant on a 3DS request sig { returns(T.nilable(String)) } attr_reader :url end class NetworkData < Stripe::StripeObject + # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. sig { returns(T.nilable(String)) } attr_reader :acquiring_institution_id + # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. sig { returns(T.nilable(String)) } attr_reader :system_trace_audit_number + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class PendingRequest < Stripe::StripeObject class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end + # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. sig { returns(T::Boolean) } attr_reader :is_amount_controllable + # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :merchant_amount + # The local currency the merchant is requesting to authorize. sig { returns(String) } attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. sig { returns(T.nilable(Integer)) } attr_reader :network_risk_score end class RequestHistory < Stripe::StripeObject class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end + # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. sig { returns(Integer) } attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details + # Whether this request was approved. sig { returns(T::Boolean) } attr_reader :approved + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :merchant_amount + # The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. sig { returns(T.nilable(Integer)) } attr_reader :network_risk_score + # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. sig { returns(String) } attr_reader :reason + # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. sig { returns(T.nilable(String)) } attr_reader :reason_message + # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. sig { returns(T.nilable(Integer)) } attr_reader :requested_at end class Treasury < Stripe::StripeObject + # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization sig { returns(T::Array[String]) } attr_reader :received_credits + # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization sig { returns(T::Array[String]) } attr_reader :received_debits + # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization sig { returns(T.nilable(String)) } attr_reader :transaction end class VerificationData < Stripe::StripeObject class AuthenticationExemption < Stripe::StripeObject + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. sig { returns(String) } attr_reader :claimed_by + # The specific exemption claimed for this authorization. sig { returns(String) } attr_reader :type end class ThreeDSecure < Stripe::StripeObject + # The outcome of the 3D Secure authentication request. sig { returns(String) } attr_reader :result end + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. sig { returns(String) } attr_reader :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. sig { returns(String) } attr_reader :address_postal_code_check + # The exemption applied to this authorization. sig { returns(T.nilable(AuthenticationExemption)) } attr_reader :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. sig { returns(String) } attr_reader :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. sig { returns(String) } attr_reader :expiry_check + # The postal code submitted as part of the authorization used for postal code verification. sig { returns(T.nilable(String)) } attr_reader :postal_code + # 3D Secure details. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure end - sig { returns(Integer) } # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(AmountDetails)) } + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details - sig { returns(T::Boolean) } + # Whether the authorization has been approved. + sig { returns(T::Boolean) } attr_reader :approved - sig { returns(String) } + # How the card details were provided. + sig { returns(String) } attr_reader :authorization_method - sig { returns(T::Array[Stripe::BalanceTransaction]) } + # List of balance transactions associated with this authorization. + sig { returns(T::Array[Stripe::BalanceTransaction]) } attr_reader :balance_transactions - sig { returns(Stripe::Issuing::Card) } + # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + sig { returns(Stripe::Issuing::Card) } attr_reader :card - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } + # The cardholder to whom this authorization belongs. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } attr_reader :cardholder - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(Fleet)) } + # Fleet-specific information for authorizations using Fleet cards. + sig { returns(T.nilable(Fleet)) } attr_reader :fleet - sig { returns(T.nilable(T::Array[FraudChallenge])) } + # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + sig { returns(T.nilable(T::Array[FraudChallenge])) } attr_reader :fraud_challenges - sig { returns(T.nilable(Fuel)) } + # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + sig { returns(T.nilable(Fuel)) } attr_reader :fuel - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Integer) } + # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + sig { returns(Integer) } attr_reader :merchant_amount - sig { returns(String) } + # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :merchant_currency - sig { returns(MerchantData) } + # Attribute for field merchant_data + sig { returns(MerchantData) } attr_reader :merchant_data - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NetworkData)) } + # Details about the authorization, such as identifiers, set by the card network. + sig { returns(T.nilable(NetworkData)) } attr_reader :network_data - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PendingRequest)) } + # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + sig { returns(T.nilable(PendingRequest)) } attr_reader :pending_request - sig { returns(T::Array[RequestHistory]) } + # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + sig { returns(T::Array[RequestHistory]) } attr_reader :request_history - sig { returns(String) } + # The current status of the authorization in its lifecycle. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } attr_reader :token - sig { returns(T::Array[Stripe::Issuing::Transaction]) } + # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + sig { returns(T::Array[Stripe::Issuing::Transaction]) } attr_reader :transactions - sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + sig { returns(T.nilable(Treasury)) } attr_reader :treasury - sig { returns(VerificationData) } + # Attribute for field verification_data + sig { returns(VerificationData) } attr_reader :verification_data - sig { returns(T.nilable(T::Boolean)) } + # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + sig { returns(T.nilable(T::Boolean)) } attr_reader :verified_by_fraud_challenge - sig { returns(T.nilable(String)) } + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + sig { returns(T.nilable(String)) } attr_reader :wallet end end diff --git a/rbi/stripe/resources/issuing/card.rbi b/rbi/stripe/resources/issuing/card.rbi index c232e804e..d223aa99b 100644 --- a/rbi/stripe/resources/issuing/card.rbi +++ b/rbi/stripe/resources/issuing/card.rbi @@ -8,187 +8,255 @@ module Stripe class Card < APIResource class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressValidation < Stripe::StripeObject class NormalizedAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # The address validation capabilities to use. sig { returns(String) } attr_reader :mode + # The normalized shipping address. sig { returns(T.nilable(NormalizedAddress)) } attr_reader :normalized_address + # The validation result for the shipping address. sig { returns(T.nilable(String)) } attr_reader :result end class Customs < Stripe::StripeObject + # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. sig { returns(T.nilable(String)) } attr_reader :eori_number end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Address validation details for the shipment. sig { returns(T.nilable(AddressValidation)) } attr_reader :address_validation + # The delivery company that shipped a card. sig { returns(T.nilable(String)) } attr_reader :carrier + # Additional information that may be required for clearing customs. sig { returns(T.nilable(Customs)) } attr_reader :customs + # A unix timestamp representing a best estimate of when the card will be delivered. sig { returns(T.nilable(Integer)) } attr_reader :eta + # Recipient name. sig { returns(String) } attr_reader :name + # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. sig { returns(T.nilable(String)) } attr_reader :phone_number + # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. sig { returns(T.nilable(T::Boolean)) } attr_reader :require_signature + # Shipment service, such as `standard` or `express`. sig { returns(String) } attr_reader :service + # The delivery status of the card. sig { returns(T.nilable(String)) } attr_reader :status + # A tracking number for a card shipment. sig { returns(T.nilable(String)) } attr_reader :tracking_number + # A link to the shipping carrier's site where you can view detailed information about a card shipment. sig { returns(T.nilable(String)) } attr_reader :tracking_url + # Packaging options. sig { returns(String) } attr_reader :type end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. sig { returns(T.nilable(T::Array[String])) } attr_reader :categories + # Interval (or event) to which the amount applies. sig { returns(String) } attr_reader :interval end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). sig { returns(T.nilable(T::Array[SpendingLimit])) } attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. Always the same as the currency of the card. sig { returns(T.nilable(String)) } attr_reader :spending_limits_currency end class Wallets < Stripe::StripeObject class ApplePay < Stripe::StripeObject + # Apple Pay Eligibility sig { returns(T::Boolean) } attr_reader :eligible + # Reason the card is ineligible for Apple Pay sig { returns(T.nilable(String)) } attr_reader :ineligible_reason end class GooglePay < Stripe::StripeObject + # Google Pay Eligibility sig { returns(T::Boolean) } attr_reader :eligible + # Reason the card is ineligible for Google Pay sig { returns(T.nilable(String)) } attr_reader :ineligible_reason end + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Unique identifier for a card used with digital wallets sig { returns(T.nilable(String)) } attr_reader :primary_account_identifier end - sig { returns(String) } # The brand of the card. + sig { returns(String) } attr_reader :brand - sig { returns(T.nilable(String)) } + # The reason why the card was canceled. + sig { returns(T.nilable(String)) } attr_reader :cancellation_reason - sig { returns(Stripe::Issuing::Cardholder) } + # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. # # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + sig { returns(Stripe::Issuing::Cardholder) } attr_reader :cardholder - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. - attr_reader :currency sig { returns(String) } + attr_reader :currency + # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + sig { returns(String) } attr_reader :cvc - sig { returns(Integer) } + # The expiration month of the card. - attr_reader :exp_month sig { returns(Integer) } + attr_reader :exp_month + # The expiration year of the card. + sig { returns(Integer) } attr_reader :exp_year - sig { returns(T.nilable(String)) } + # The financial account this card is attached to. + sig { returns(T.nilable(String)) } attr_reader :financial_account - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The last 4 digits of the card number. + sig { returns(String) } attr_reader :last4 - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. - attr_reader :number sig { returns(String) } + attr_reader :number + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) } + # The personalization design object belonging to this card. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) } attr_reader :personalization_design - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + # The latest card that replaces this card, if any. - attr_reader :replaced_by sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + attr_reader :replaced_by + # The card this card replaces, if any. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } attr_reader :replacement_for - sig { returns(T.nilable(String)) } + # The reason why the previous card needed to be replaced. + sig { returns(T.nilable(String)) } attr_reader :replacement_reason - sig { returns(T.nilable(Shipping)) } + # Where and how the card will be shipped. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping - sig { returns(SpendingControls) } + # Attribute for field spending_controls + sig { returns(SpendingControls) } attr_reader :spending_controls - sig { returns(String) } + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. - attr_reader :status sig { returns(String) } + attr_reader :status + # The type of the card. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Wallets)) } + # Information relating to digital wallets (like Apple Pay and Google Pay). + sig { returns(T.nilable(Wallets)) } attr_reader :wallets end end diff --git a/rbi/stripe/resources/issuing/cardholder.rbi b/rbi/stripe/resources/issuing/cardholder.rbi index ee2b27fe1..0b44b85d3 100644 --- a/rbi/stripe/resources/issuing/cardholder.rbi +++ b/rbi/stripe/resources/issuing/cardholder.rbi @@ -10,144 +10,193 @@ module Stripe class Cardholder < APIResource class Billing < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class Company < Stripe::StripeObject + # Whether the company's business ID number was provided. sig { returns(T::Boolean) } attr_reader :tax_id_provided end class Individual < Stripe::StripeObject class CardIssuing < Stripe::StripeObject class UserTermsAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. sig { returns(T.nilable(UserTermsAcceptance)) } attr_reader :user_terms_acceptance end class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end + # An identifying document, either a passport or local ID card. sig { returns(T.nilable(Document)) } attr_reader :document end + # Information related to the card_issuing program for this cardholder. sig { returns(T.nilable(CardIssuing)) } attr_reader :card_issuing + # The date of birth of this cardholder. sig { returns(T.nilable(Dob)) } attr_reader :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. sig { returns(T.nilable(String)) } attr_reader :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. sig { returns(T.nilable(String)) } attr_reader :last_name + # Government-issued ID document for this cardholder. sig { returns(T.nilable(Verification)) } attr_reader :verification end class Requirements < Stripe::StripeObject + # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Array of fields that need to be collected in order to verify and re-enable the cardholder. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. sig { returns(T.nilable(T::Array[String])) } attr_reader :categories + # Interval (or event) to which the amount applies. sig { returns(String) } attr_reader :interval end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. sig { returns(T.nilable(T::Array[SpendingLimit])) } attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. sig { returns(T.nilable(String)) } attr_reader :spending_limits_currency end - sig { returns(Billing) } # Attribute for field billing + sig { returns(Billing) } attr_reader :billing - sig { returns(T.nilable(Company)) } + # Additional information about a `company` cardholder. + sig { returns(T.nilable(Company)) } attr_reader :company - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # The cardholder's email address. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(Individual)) } + # Additional information about an `individual` cardholder. + sig { returns(T.nilable(Individual)) } attr_reader :individual - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The cardholder's name. This will be printed on cards issued to them. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + sig { returns(T.nilable(String)) } attr_reader :phone_number - sig { returns(T.nilable(T::Array[String])) } + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - sig { returns(Requirements) } + # Attribute for field requirements + sig { returns(Requirements) } attr_reader :requirements - sig { returns(T.nilable(SpendingControls)) } + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(T.nilable(SpendingControls)) } attr_reader :spending_controls - sig { returns(String) } + # Specifies whether to permit authorizations on this cardholder's cards. - attr_reader :status sig { returns(String) } + attr_reader :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi index 7bad74caf..82d55a1fd 100644 --- a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +++ b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi @@ -9,103 +9,137 @@ module Stripe # [Follow the guide](https://stripe.com/docs/issuing/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. class CreditUnderwritingRecord < APIResource class Application < Stripe::StripeObject + # The channel through which the applicant has submitted their application. sig { returns(String) } attr_reader :application_method + # Scope of demand made by the applicant. sig { returns(String) } attr_reader :purpose + # Date when the applicant submitted their application. sig { returns(Integer) } attr_reader :submitted_at end class CreditUser < Stripe::StripeObject + # Email of the applicant or accountholder. sig { returns(String) } attr_reader :email + # Full name of the company or person. sig { returns(String) } attr_reader :name end class Decision < Stripe::StripeObject class ApplicationRejected < Stripe::StripeObject + # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation + # List of reasons why the application was rejected up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end class CreditLimitApproved < Stripe::StripeObject + # Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end class CreditLimitDecreased < Stripe::StripeObject + # Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end class CreditLineClosed < Stripe::StripeObject + # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation + # List of reasons why the existing account was closed, up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end + # Details about a decision application_rejected. sig { returns(T.nilable(ApplicationRejected)) } attr_reader :application_rejected + # Details about a decision credit_limit_approved. sig { returns(T.nilable(CreditLimitApproved)) } attr_reader :credit_limit_approved + # Details about a decision credit_limit_decreased. sig { returns(T.nilable(CreditLimitDecreased)) } attr_reader :credit_limit_decreased + # Details about a decision credit_line_closed. sig { returns(T.nilable(CreditLineClosed)) } attr_reader :credit_line_closed + # Outcome of the decision. sig { returns(String) } attr_reader :type end class UnderwritingException < Stripe::StripeObject + # Written explanation for the exception. sig { returns(String) } attr_reader :explanation + # The decision before the exception was applied. sig { returns(String) } attr_reader :original_decision_type end - sig { returns(T.nilable(Application)) } # For decisions triggered by an application, details about the submission. + sig { returns(T.nilable(Application)) } attr_reader :application - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The event that triggered the underwriting. + sig { returns(String) } attr_reader :created_from - sig { returns(CreditUser) } + # Attribute for field credit_user + sig { returns(CreditUser) } attr_reader :credit_user - sig { returns(T.nilable(Integer)) } + # Date when a decision was made. + sig { returns(T.nilable(Integer)) } attr_reader :decided_at - sig { returns(T.nilable(Decision)) } + # Details about the decision. + sig { returns(T.nilable(Decision)) } attr_reader :decision - sig { returns(T.nilable(Integer)) } + # For underwriting initiated by an application, a decision must be taken 30 days after the submission. + sig { returns(T.nilable(Integer)) } attr_reader :decision_deadline - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + sig { returns(T.nilable(String)) } attr_reader :regulatory_reporting_file - sig { returns(T.nilable(UnderwritingException)) } + # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { returns(T.nilable(UnderwritingException)) } attr_reader :underwriting_exception end end diff --git a/rbi/stripe/resources/issuing/dispute.rbi b/rbi/stripe/resources/issuing/dispute.rbi index cf2ab7e68..0dacacd4a 100644 --- a/rbi/stripe/resources/issuing/dispute.rbi +++ b/rbi/stripe/resources/issuing/dispute.rbi @@ -10,164 +10,227 @@ module Stripe class Dispute < APIResource class Evidence < Stripe::StripeObject class Canceled < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Date when order was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Whether the cardholder was provided with a cancellation policy. sig { returns(T.nilable(T::Boolean)) } attr_reader :cancellation_policy_provided + # Reason for canceling the order. sig { returns(T.nilable(String)) } attr_reader :cancellation_reason + # Date when the cardholder expected to receive the product. sig { returns(T.nilable(Integer)) } attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description + # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type + # Result of cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_status + # Date when the product was returned or attempted to be returned. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class Duplicate < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :check_image + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. sig { returns(T.nilable(String)) } attr_reader :original_transaction end class Fraudulent < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation end class MerchandiseNotAsDescribed < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Date when the product was received. sig { returns(T.nilable(Integer)) } attr_reader :received_at + # Description of the cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_description + # Result of cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_status + # Date when the product was returned or attempted to be returned. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class NoValidAuthorization < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation end class NotReceived < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Date when the cardholder expected to receive the product. sig { returns(T.nilable(Integer)) } attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description + # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type end class Other < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description + # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type end class ServiceNotAsDescribed < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Date when order was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Reason for canceling the order. sig { returns(T.nilable(String)) } attr_reader :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Date when the product was received. sig { returns(T.nilable(Integer)) } attr_reader :received_at end + # Attribute for field canceled sig { returns(Canceled) } attr_reader :canceled + # Attribute for field duplicate sig { returns(Duplicate) } attr_reader :duplicate + # Attribute for field fraudulent sig { returns(Fraudulent) } attr_reader :fraudulent + # Attribute for field merchandise_not_as_described sig { returns(MerchandiseNotAsDescribed) } attr_reader :merchandise_not_as_described + # Attribute for field no_valid_authorization sig { returns(NoValidAuthorization) } attr_reader :no_valid_authorization + # Attribute for field not_received sig { returns(NotReceived) } attr_reader :not_received + # Attribute for field other sig { returns(Other) } attr_reader :other + # The reason for filing the dispute. Its value will match the field containing the evidence. sig { returns(String) } attr_reader :reason + # Attribute for field service_not_as_described sig { returns(ServiceNotAsDescribed) } attr_reader :service_not_as_described end class Treasury < Stripe::StripeObject + # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute sig { returns(T.nilable(String)) } attr_reader :debit_reversal + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. sig { returns(String) } attr_reader :received_debit end - sig { returns(Integer) } # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) } + # List of balance transactions associated with the dispute. + sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) } attr_reader :balance_transactions - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The currency the `transaction` was made in. + sig { returns(String) } attr_reader :currency - sig { returns(Evidence) } + # Attribute for field evidence + sig { returns(Evidence) } attr_reader :evidence - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + sig { returns(String) } attr_reader :loss_reason - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Current status of the dispute. + sig { returns(String) } attr_reader :status - sig { returns(T.any(String, Stripe::Issuing::Transaction)) } + # The transaction being disputed. + sig { returns(T.any(String, Stripe::Issuing::Transaction)) } attr_reader :transaction - sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + sig { returns(T.nilable(Treasury)) } attr_reader :treasury end end diff --git a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi index 309ad946d..46f484da3 100644 --- a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +++ b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi @@ -6,38 +6,48 @@ module Stripe module Issuing # Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects. class DisputeSettlementDetail < APIResource - sig { returns(Integer) } # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } + # The card used to make the original transaction. + sig { returns(String) } attr_reader :card - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # The ID of the linked dispute. - attr_reader :dispute sig { returns(String) } + attr_reader :dispute + # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. - attr_reader :event_type sig { returns(String) } + attr_reader :event_type + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] - attr_reader :network sig { returns(String) } + attr_reader :network + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The ID of the linked card network settlement. + sig { returns(T.nilable(String)) } attr_reader :settlement end end diff --git a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi index 2435ce53c..5d0ee1af2 100644 --- a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +++ b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi @@ -6,29 +6,36 @@ module Stripe module Issuing # A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. class FraudLiabilityDebit < APIResource - sig { returns(Integer) } # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # The ID of the linked dispute. - attr_reader :dispute sig { returns(String) } + attr_reader :dispute + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/issuing/personalization_design.rbi b/rbi/stripe/resources/issuing/personalization_design.rbi index 5501e8cb1..136f9e82f 100644 --- a/rbi/stripe/resources/issuing/personalization_design.rbi +++ b/rbi/stripe/resources/issuing/personalization_design.rbi @@ -7,65 +7,85 @@ module Stripe # A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. class PersonalizationDesign < APIResource class CarrierText < Stripe::StripeObject + # The footer body text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :footer_body + # The footer title text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :footer_title + # The header body text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :header_body + # The header title text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :header_title end class Preferences < Stripe::StripeObject + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. sig { returns(T::Boolean) } attr_reader :is_default + # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. sig { returns(T.nilable(T::Boolean)) } attr_reader :is_platform_default end class RejectionReasons < Stripe::StripeObject + # The reason(s) the card logo was rejected. sig { returns(T.nilable(T::Array[String])) } attr_reader :card_logo + # The reason(s) the carrier text was rejected. sig { returns(T.nilable(T::Array[String])) } attr_reader :carrier_text end - sig { returns(T.nilable(T.any(String, Stripe::File))) } # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :card_logo - sig { returns(T.nilable(CarrierText)) } + # Hash containing carrier text, for use with physical bundles that support carrier text. + sig { returns(T.nilable(CarrierText)) } attr_reader :carrier_text - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + sig { returns(T.nilable(String)) } attr_reader :lookup_key - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # Friendly display name. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) } + # The physical bundle object belonging to this personalization design. + sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) } attr_reader :physical_bundle - sig { returns(Preferences) } + # Attribute for field preferences + sig { returns(Preferences) } attr_reader :preferences - sig { returns(RejectionReasons) } + # Attribute for field rejection_reasons + sig { returns(RejectionReasons) } attr_reader :rejection_reasons - sig { returns(String) } + # Whether this personalization design can be used to create cards. + sig { returns(String) } attr_reader :status end end diff --git a/rbi/stripe/resources/issuing/physical_bundle.rbi b/rbi/stripe/resources/issuing/physical_bundle.rbi index 31db54f76..81142c152 100644 --- a/rbi/stripe/resources/issuing/physical_bundle.rbi +++ b/rbi/stripe/resources/issuing/physical_bundle.rbi @@ -7,33 +7,42 @@ module Stripe # A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. class PhysicalBundle < APIResource class Features < Stripe::StripeObject + # The policy for how to use card logo images in a card design with this physical bundle. sig { returns(String) } attr_reader :card_logo + # The policy for how to use carrier letter text in a card design with this physical bundle. sig { returns(String) } attr_reader :carrier_text + # The policy for how to use a second line on a card with this physical bundle. sig { returns(String) } attr_reader :second_line end - sig { returns(Features) } # Attribute for field features + sig { returns(Features) } attr_reader :features - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # Friendly display name. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Whether this physical bundle can be used to create cards. - attr_reader :status sig { returns(String) } + attr_reader :status + # Whether this physical bundle is a standard Stripe offering or custom-made for you. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/issuing/settlement.rbi b/rbi/stripe/resources/issuing/settlement.rbi index c754c8033..eb2fd32ef 100644 --- a/rbi/stripe/resources/issuing/settlement.rbi +++ b/rbi/stripe/resources/issuing/settlement.rbi @@ -6,56 +6,72 @@ module Stripe module Issuing # When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. class Settlement < APIResource - sig { returns(String) } # The Bank Identification Number reflecting this settlement record. + sig { returns(String) } attr_reader :bin - sig { returns(Integer) } + # The date that the transactions are cleared and posted to user's accounts. - attr_reader :clearing_date sig { returns(Integer) } + attr_reader :clearing_date + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Integer) } + # The total interchange received as reimbursement for the transactions. + sig { returns(Integer) } attr_reader :interchange_fees - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(Integer) } + # The total net amount required to settle with the network. + sig { returns(Integer) } attr_reader :net_total - sig { returns(String) } + # The card network for this settlement report. One of ["visa", "maestro"] + sig { returns(String) } attr_reader :network - sig { returns(Integer) } + # The total amount of fees owed to the network. + sig { returns(Integer) } attr_reader :network_fees - sig { returns(String) } + # The Settlement Identification Number assigned by the network. - attr_reader :network_settlement_identifier sig { returns(String) } + attr_reader :network_settlement_identifier + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # One of `international` or `uk_national_net`. - attr_reader :settlement_service sig { returns(String) } + attr_reader :settlement_service + # The current processing status of this settlement. + sig { returns(String) } attr_reader :status - sig { returns(Integer) } + # The total number of transactions reflected in this settlement. - attr_reader :transaction_count sig { returns(Integer) } + attr_reader :transaction_count + # The total transaction amount reflected in this settlement. + sig { returns(Integer) } attr_reader :transaction_volume end end diff --git a/rbi/stripe/resources/issuing/token.rbi b/rbi/stripe/resources/issuing/token.rbi index 6e427223f..e82e9809c 100644 --- a/rbi/stripe/resources/issuing/token.rbi +++ b/rbi/stripe/resources/issuing/token.rbi @@ -8,113 +8,155 @@ module Stripe class Token < APIResource class NetworkData < Stripe::StripeObject class Device < Stripe::StripeObject + # An obfuscated ID derived from the device ID. sig { returns(String) } attr_reader :device_fingerprint + # The IP address of the device at provisioning time. sig { returns(String) } attr_reader :ip_address + # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. sig { returns(String) } attr_reader :location + # The name of the device used for tokenization. sig { returns(String) } attr_reader :name + # The phone number of the device used for tokenization. sig { returns(String) } attr_reader :phone_number + # The type of device used for tokenization. sig { returns(String) } attr_reader :type end class Mastercard < Stripe::StripeObject + # A unique reference ID from MasterCard to represent the card account number. sig { returns(String) } attr_reader :card_reference_id + # The network-unique identifier for the token. sig { returns(String) } attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to MasterCard. sig { returns(String) } attr_reader :token_requestor_id + # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. sig { returns(String) } attr_reader :token_requestor_name end class Visa < Stripe::StripeObject + # A unique reference ID from Visa to represent the card account number. sig { returns(String) } attr_reader :card_reference_id + # The network-unique identifier for the token. sig { returns(String) } attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to Visa. sig { returns(String) } attr_reader :token_requestor_id + # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. sig { returns(String) } attr_reader :token_risk_score end class WalletProvider < Stripe::StripeObject class CardholderAddress < Stripe::StripeObject + # The street address of the cardholder tokenizing the card. sig { returns(String) } attr_reader :line1 + # The postal code of the cardholder tokenizing the card. sig { returns(String) } attr_reader :postal_code end + # The wallet provider-given account ID of the digital wallet the token belongs to. sig { returns(String) } attr_reader :account_id + # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. sig { returns(Integer) } attr_reader :account_trust_score + # The method used for tokenizing a card. sig { returns(String) } attr_reader :card_number_source + # Attribute for field cardholder_address sig { returns(CardholderAddress) } attr_reader :cardholder_address + # The name of the cardholder tokenizing the card. sig { returns(String) } attr_reader :cardholder_name + # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. sig { returns(Integer) } attr_reader :device_trust_score + # The hashed email address of the cardholder's account with the wallet provider. sig { returns(String) } attr_reader :hashed_account_email_address + # The reasons for suggested tokenization given by the card network. sig { returns(T::Array[String]) } attr_reader :reason_codes + # The recommendation on responding to the tokenization request. sig { returns(String) } attr_reader :suggested_decision + # The version of the standard for mapping reason codes followed by the wallet provider. sig { returns(String) } attr_reader :suggested_decision_version end + # Attribute for field device sig { returns(Device) } attr_reader :device + # Attribute for field mastercard sig { returns(Mastercard) } attr_reader :mastercard + # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. sig { returns(String) } attr_reader :type + # Attribute for field visa sig { returns(Visa) } attr_reader :visa + # Attribute for field wallet_provider sig { returns(WalletProvider) } attr_reader :wallet_provider end - sig { returns(T.any(String, Stripe::Issuing::Card)) } # Card associated with this token. + sig { returns(T.any(String, Stripe::Issuing::Card)) } attr_reader :card - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # The hashed ID derived from the device ID from the card network associated with the token. + sig { returns(T.nilable(String)) } attr_reader :device_fingerprint - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The last four digits of the token. + sig { returns(String) } attr_reader :last4 - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The token service provider / card network associated with the token. + sig { returns(String) } attr_reader :network - sig { returns(NetworkData) } + # Attribute for field network_data + sig { returns(NetworkData) } attr_reader :network_data - sig { returns(Integer) } + # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :network_updated_at - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The usage state of the token. - attr_reader :status sig { returns(String) } + attr_reader :status + # The digital wallet for this token, if one was used. + sig { returns(String) } attr_reader :wallet_provider end end diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi index d11aa8e17..bd3daf349 100644 --- a/rbi/stripe/resources/issuing/transaction.rbi +++ b/rbi/stripe/resources/issuing/transaction.rbi @@ -11,227 +11,310 @@ module Stripe # Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) class Transaction < APIResource class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end class MerchantData < Stripe::StripeObject + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. sig { returns(String) } attr_reader :category + # The merchant category code for the seller’s business sig { returns(String) } attr_reader :category_code + # City where the seller is located sig { returns(T.nilable(String)) } attr_reader :city + # Country where the seller is located sig { returns(T.nilable(String)) } attr_reader :country + # Name of the seller sig { returns(T.nilable(String)) } attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. sig { returns(String) } attr_reader :network_id + # Postal code where the seller is located sig { returns(T.nilable(String)) } attr_reader :postal_code + # State where the seller is located sig { returns(T.nilable(String)) } attr_reader :state + # An ID assigned by the seller to the location of the sale. sig { returns(T.nilable(String)) } attr_reader :terminal_id + # URL provided by the merchant on a 3DS request sig { returns(T.nilable(String)) } attr_reader :url end class NetworkData < Stripe::StripeObject + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. sig { returns(T.nilable(String)) } attr_reader :processing_date + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class PurchaseDetails < Stripe::StripeObject class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject + # Driver ID. sig { returns(T.nilable(String)) } attr_reader :driver_id + # Odometer reading. sig { returns(T.nilable(Integer)) } attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. sig { returns(T.nilable(String)) } attr_reader :unspecified_id + # User ID. sig { returns(T.nilable(String)) } attr_reader :user_id + # Vehicle number. sig { returns(T.nilable(String)) } attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :national_amount_decimal end + # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. sig { returns(T.nilable(NonFuel)) } attr_reader :non_fuel + # Information about tax included in this transaction. sig { returns(T.nilable(Tax)) } attr_reader :tax end + # Answers to prompts presented to cardholder at point of sale. sig { returns(T.nilable(CardholderPromptData)) } attr_reader :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. sig { returns(T.nilable(String)) } attr_reader :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. sig { returns(T.nilable(ReportedBreakdown)) } attr_reader :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. sig { returns(T.nilable(String)) } attr_reader :service_type end class Flight < Stripe::StripeObject class Segment < Stripe::StripeObject + # The three-letter IATA airport code of the flight's destination. sig { returns(T.nilable(String)) } attr_reader :arrival_airport_code + # The airline carrier code. sig { returns(T.nilable(String)) } attr_reader :carrier + # The three-letter IATA airport code that the flight departed from. sig { returns(T.nilable(String)) } attr_reader :departure_airport_code + # The flight number. sig { returns(T.nilable(String)) } attr_reader :flight_number + # The flight's service class. sig { returns(T.nilable(String)) } attr_reader :service_class + # Whether a stopover is allowed on this flight. sig { returns(T.nilable(T::Boolean)) } attr_reader :stopover_allowed end + # The time that the flight departed. sig { returns(T.nilable(Integer)) } attr_reader :departure_at + # The name of the passenger. sig { returns(T.nilable(String)) } attr_reader :passenger_name + # Whether the ticket is refundable. sig { returns(T.nilable(T::Boolean)) } attr_reader :refundable + # The legs of the trip. sig { returns(T.nilable(T::Array[Segment])) } attr_reader :segments + # The travel agency that issued the ticket. sig { returns(T.nilable(String)) } attr_reader :travel_agency end class Fuel < Stripe::StripeObject + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. sig { returns(T.nilable(String)) } attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(String) } attr_reader :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. sig { returns(String) } attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. sig { returns(String) } attr_reader :unit_cost_decimal end class Lodging < Stripe::StripeObject + # The time of checking into the lodging. sig { returns(T.nilable(Integer)) } attr_reader :check_in_at + # The number of nights stayed at the lodging. sig { returns(T.nilable(Integer)) } attr_reader :nights end class Receipt < Stripe::StripeObject + # The description of the item. The maximum length of this field is 26 characters. sig { returns(T.nilable(String)) } attr_reader :description + # The quantity of the item. sig { returns(T.nilable(Float)) } attr_reader :quantity + # The total for this line item in cents. sig { returns(T.nilable(Integer)) } attr_reader :total + # The unit cost of the item in cents. sig { returns(T.nilable(Integer)) } attr_reader :unit_cost end + # Fleet-specific information for transactions using Fleet cards. sig { returns(T.nilable(Fleet)) } attr_reader :fleet + # Information about the flight that was purchased with this transaction. sig { returns(T.nilable(Flight)) } attr_reader :flight + # Information about fuel that was purchased with this transaction. sig { returns(T.nilable(Fuel)) } attr_reader :fuel + # Information about lodging that was purchased with this transaction. sig { returns(T.nilable(Lodging)) } attr_reader :lodging + # The line items in the purchase. sig { returns(T.nilable(T::Array[Receipt])) } attr_reader :receipt + # A merchant-specific order number. sig { returns(T.nilable(String)) } attr_reader :reference end class Treasury < Stripe::StripeObject + # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund sig { returns(T.nilable(String)) } attr_reader :received_credit + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture sig { returns(T.nilable(String)) } attr_reader :received_debit end - sig { returns(Integer) } # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(AmountDetails)) } + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) } + # The `Authorization` object that led to this transaction. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) } attr_reader :authorization - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(T.any(String, Stripe::Issuing::Card)) } + # The card used to make this transaction. + sig { returns(T.any(String, Stripe::Issuing::Card)) } attr_reader :card - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } + # The cardholder to whom this transaction belongs. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } attr_reader :cardholder - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) } + # If you've disputed the transaction, the ID of the dispute. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) } attr_reader :dispute - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Integer) } + # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + sig { returns(Integer) } attr_reader :merchant_amount - sig { returns(String) } + # The currency with which the merchant is taking payment. + sig { returns(String) } attr_reader :merchant_currency - sig { returns(MerchantData) } + # Attribute for field merchant_data + sig { returns(MerchantData) } attr_reader :merchant_data - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NetworkData)) } + # Details about the transaction, such as processing dates, set by the card network. + sig { returns(T.nilable(NetworkData)) } attr_reader :network_data - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PurchaseDetails)) } + # Additional purchase information that is optionally provided by the merchant. + sig { returns(T.nilable(PurchaseDetails)) } attr_reader :purchase_details - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Settlement))) } + # Attribute for field settlement + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Settlement))) } attr_reader :settlement - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } attr_reader :token - sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + sig { returns(T.nilable(Treasury)) } attr_reader :treasury - sig { returns(String) } + # The nature of the transaction. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + sig { returns(T.nilable(String)) } attr_reader :wallet end end diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi index 3b6a6db8a..c6124ff0e 100644 --- a/rbi/stripe/resources/line_item.rbi +++ b/rbi/stripe/resources/line_item.rbi @@ -6,61 +6,84 @@ module Stripe # A line item. class LineItem < APIResource class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # Total discount amount applied. If no discounts were applied, defaults to 0. - attr_reader :amount_discount sig { returns(Integer) } + attr_reader :amount_discount + # Total before any discounts or taxes are applied. - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal + # Total tax amount applied. If no tax was applied, defaults to 0. - attr_reader :amount_tax sig { returns(Integer) } + attr_reader :amount_tax + # Total after discounts and taxes. + sig { returns(Integer) } attr_reader :amount_total - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + sig { returns(String) } attr_reader :description - sig { returns(T::Array[Discount]) } + # The discounts applied to the line item. + sig { returns(T::Array[Discount]) } attr_reader :discounts - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Stripe::Price)) } + # The price used to generate the line item. + sig { returns(T.nilable(Stripe::Price)) } attr_reader :price - sig { returns(T.any(String, Stripe::Product)) } + # The ID of the product for this line item. # # This will always be the same as `price.product`. + sig { returns(T.any(String, Stripe::Product)) } attr_reader :product - sig { returns(T.nilable(Integer)) } + # The quantity of products being purchased. + sig { returns(T.nilable(Integer)) } attr_reader :quantity - sig { returns(T::Array[Tax]) } + # The taxes applied to the line item. + sig { returns(T::Array[Tax]) } attr_reader :taxes end end \ No newline at end of file diff --git a/rbi/stripe/resources/login_link.rbi b/rbi/stripe/resources/login_link.rbi index eca4eb558..1774125f4 100644 --- a/rbi/stripe/resources/login_link.rbi +++ b/rbi/stripe/resources/login_link.rbi @@ -5,14 +5,16 @@ module Stripe # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. class LoginLink < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The URL for the login link. + sig { returns(String) } attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi index 914b85a50..e4244d4d6 100644 --- a/rbi/stripe/resources/mandate.rbi +++ b/rbi/stripe/resources/mandate.rbi @@ -8,44 +8,59 @@ module Stripe class CustomerAcceptance < Stripe::StripeObject class Offline < Stripe::StripeObject; end class Online < Stripe::StripeObject + # The customer accepts the mandate from this IP address. sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer accepts the mandate using the user agent of the browser. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # The time that the customer accepts the mandate. sig { returns(T.nilable(Integer)) } attr_reader :accepted_at + # Attribute for field offline sig { returns(Offline) } attr_reader :offline + # Attribute for field online sig { returns(Online) } attr_reader :online + # The mandate includes the type of customer acceptance information, such as: `online` or `offline`. sig { returns(String) } attr_reader :type end class MultiUse < Stripe::StripeObject; end class PaymentMethodDetails < Stripe::StripeObject class AcssDebit < Stripe::StripeObject + # List of Stripe products where this mandate can be selected automatically. sig { returns(T::Array[String]) } attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(String) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(String) } attr_reader :transaction_type end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. sig { returns(String) } attr_reader :url end class BacsDebit < Stripe::StripeObject + # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. sig { returns(String) } attr_reader :network_status + # The unique reference identifying the mandate on the Bacs network. sig { returns(String) } attr_reader :reference + # When the mandate is revoked on the Bacs network this field displays the reason for the revocation. sig { returns(T.nilable(String)) } attr_reader :revocation_reason + # The URL that will contain the mandate that the customer has signed. sig { returns(String) } attr_reader :url end @@ -55,111 +70,153 @@ module Stripe class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class Paypal < Stripe::StripeObject + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. sig { returns(T.nilable(String)) } attr_reader :billing_agreement_id + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(String) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(String) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject + # The unique reference of the mandate. sig { returns(String) } attr_reader :reference + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. sig { returns(String) } attr_reader :url end class UsBankAccount < Stripe::StripeObject + # Mandate collection method sig { returns(String) } attr_reader :collection_method end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class SingleUse < Stripe::StripeObject + # The amount of the payment on a single use mandate. sig { returns(Integer) } attr_reader :amount + # The currency of the payment on a single use mandate. sig { returns(String) } attr_reader :currency end - sig { returns(CustomerAcceptance) } # Attribute for field customer_acceptance + sig { returns(CustomerAcceptance) } attr_reader :customer_acceptance - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(MultiUse) } + # Attribute for field multi_use + sig { returns(MultiUse) } attr_reader :multi_use - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The account (if any) that the mandate is intended for. + sig { returns(String) } attr_reader :on_behalf_of - sig { returns(T.any(String, Stripe::PaymentMethod)) } + # ID of the payment method associated with this mandate. + sig { returns(T.any(String, Stripe::PaymentMethod)) } attr_reader :payment_method - sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details + sig { returns(PaymentMethodDetails) } attr_reader :payment_method_details - sig { returns(SingleUse) } + # Attribute for field single_use + sig { returns(SingleUse) } attr_reader :single_use - sig { returns(String) } + # The mandate status indicates whether or not you can use it to initiate a payment. - attr_reader :status sig { returns(String) } + attr_reader :status + # The type of the mandate. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/margin.rbi b/rbi/stripe/resources/margin.rbi index 09335115e..033757acb 100644 --- a/rbi/stripe/resources/margin.rbi +++ b/rbi/stripe/resources/margin.rbi @@ -6,32 +6,40 @@ module Stripe # A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who # resell products and services and earn a discount (margin) for doing so. class Margin < APIResource - sig { returns(T::Boolean) } # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # Name of the margin that's displayed on, for example, invoices. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Float) } + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + sig { returns(Float) } attr_reader :percent_off - sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated end end \ No newline at end of file diff --git a/rbi/stripe/resources/order.rbi b/rbi/stripe/resources/order.rbi index b97c8a79d..5cb8ac441 100644 --- a/rbi/stripe/resources/order.rbi +++ b/rbi/stripe/resources/order.rbi @@ -10,438 +10,698 @@ module Stripe # Related guide: [Orders overview](https://stripe.com/docs/orders) class Order < APIResource class AutomaticTax < Stripe::StripeObject + # Whether Stripe automatically computes tax on this Order. sig { returns(T::Boolean) } attr_reader :enabled + # The status of the most recent automated tax calculation for this Order. sig { returns(T.nilable(String)) } attr_reader :status end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address for the order. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address for the order. sig { returns(T.nilable(String)) } attr_reader :email + # Full name for the order. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number for the order (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Credit < Stripe::StripeObject class GiftCard < Stripe::StripeObject + # The token of the gift card applied to the order sig { returns(String) } attr_reader :card end + # The amount of this credit to apply to the order. sig { returns(Integer) } attr_reader :amount + # Details for a gift card. sig { returns(T.nilable(GiftCard)) } attr_reader :gift_card + # Line items on this order that are ineligible for this credit sig { returns(T.nilable(T::Array[String])) } attr_reader :ineligible_line_items + # The type of credit to apply to the order, only `gift_card` currently supported. sig { returns(String) } attr_reader :type end class Payment < Stripe::StripeObject class Settings < Stripe::StripeObject class AutomaticPaymentMethods < Stripe::StripeObject + # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T::Boolean) } attr_reader :enabled end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class AfterpayClearpay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Oxxo < Stripe::StripeObject + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject + # The tax for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :amount + # The tax behavior for the line item. sig { returns(String) } attr_reader :behavior end + # Type of the line item. sig { returns(String) } attr_reader :category + # Description of the line item. sig { returns(String) } attr_reader :description + # Descriptive name of the line item. sig { returns(String) } attr_reader :name + # Quantity of the line item. Cannot be a negative number. sig { returns(Integer) } attr_reader :quantity + # Client facing stock keeping unit, article number or similar. sig { returns(String) } attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). sig { returns(String) } attr_reader :sold_by + # Attribute for field tax sig { returns(Tax) } attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :unit_amount end + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # The line items purchased by the customer. sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Preferred language of the SOFORT authorization page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class WechatPay < Stripe::StripeObject + # The app ID registered with WeChat Pay. Only required when client is ios or android. sig { returns(T.nilable(String)) } attr_reader :app_id + # The client type that the end customer will pay from sig { returns(T.nilable(String)) } attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay end class TransferData < Stripe::StripeObject + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. sig { returns(T.nilable(Integer)) } attr_reader :amount + # ID of the Connected account receiving the transfer. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount + # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. sig { returns(T.nilable(String)) } attr_reader :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end + # ID of the payment intent associated with this order. Null when the order is `open`. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent + # Settings describing how the order should configure generated PaymentIntents. sig { returns(T.nilable(Settings)) } attr_reader :settings + # The status of the underlying payment associated with this order, if any. Null when the order is `open`. sig { returns(T.nilable(String)) } attr_reader :status end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this order. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Recipient shipping address. Required if the order includes products that are shippable. sig { returns(T.nilable(Address)) } attr_reader :address + # Recipient name. sig { returns(T.nilable(String)) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class TaxDetails < Stripe::StripeObject class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end + # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. sig { returns(String) } attr_reader :tax_exempt + # The purchaser's tax IDs to be used in calculation of tax for this Order. sig { returns(T::Array[TaxId]) } attr_reader :tax_ids end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # Attribute for field amount_credit sig { returns(Integer) } attr_reader :amount_credit + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - sig { returns(Integer) } # Attribute for field amount_remaining - attr_reader :amount_remaining sig { returns(Integer) } + attr_reader :amount_remaining + # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal + # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + sig { returns(Integer) } attr_reader :amount_total - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the Order, if any. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(BillingDetails)) } + # Customer billing details associated with the order. + sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details - sig { returns(T.nilable(String)) } + # The client secret of this Order. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Array[Credit]) } + # The credits applied to the Order. At most 10 credits can be applied to an Order. + sig { returns(T::Array[Credit]) } attr_reader :credits - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer which this orders belongs to. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } + # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } attr_reader :discounts - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # A recent IP address of the purchaser used for tax reporting and tax location inference. + sig { returns(T.nilable(String)) } attr_reader :ip_address - sig { returns(Stripe::ListObject) } + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Payment) } + # Attribute for field payment + sig { returns(Payment) } attr_reader :payment - sig { returns(T.nilable(ShippingCost)) } + # The details of the customer cost of shipping, including the customer chosen ShippingRate. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } + # Customer shipping information associated with the order. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(String) } + # The overall status of the order. + sig { returns(String) } attr_reader :status - sig { returns(TaxDetails) } + # Attribute for field tax_details + sig { returns(TaxDetails) } attr_reader :tax_details - sig { returns(TotalDetails) } + # Attribute for field total_details + sig { returns(TotalDetails) } attr_reader :total_details end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_attempt_record.rbi b/rbi/stripe/resources/payment_attempt_record.rbi index 071114bca..e6a43ce9e 100644 --- a/rbi/stripe/resources/payment_attempt_record.rbi +++ b/rbi/stripe/resources/payment_attempt_record.rbi @@ -9,148 +9,200 @@ module Stripe # can have guaranteed funds. class PaymentAttemptRecord < APIResource class AmountCanceled < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountFailed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountGuaranteed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRequested < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class CustomerDetails < Stripe::StripeObject + # ID of the Stripe Customer associated with this payment. sig { returns(T.nilable(String)) } attr_reader :customer + # The customer's email address. sig { returns(T.nilable(String)) } attr_reader :email + # The customer's name. sig { returns(T.nilable(String)) } attr_reader :name + # The customer's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The billing email associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :email + # The billing name associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :name + # The billing phone number associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :phone end class Custom < Stripe::StripeObject + # Display name for the custom (user-defined) payment method type used to make this payment. sig { returns(String) } attr_reader :display_name + # The custom payment method type associated with this payment. sig { returns(T.nilable(String)) } attr_reader :type end + # The billing details associated with the method of payment. sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. sig { returns(T.nilable(Custom)) } attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. sig { returns(T.nilable(String)) } attr_reader :payment_method + # The type of Payment Method used for this payment attempt. sig { returns(String) } attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The shipping recipient's name. sig { returns(T.nilable(String)) } attr_reader :name + # The shipping recipient's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(AmountCanceled) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountCanceled) } attr_reader :amount_canceled - sig { returns(AmountFailed) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountFailed) } attr_reader :amount_failed - sig { returns(AmountGuaranteed) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountGuaranteed) } attr_reader :amount_guaranteed - sig { returns(AmountRequested) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountRequested) } attr_reader :amount_requested - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CustomerDetails)) } + # Customer information for this payment. + sig { returns(T.nilable(CustomerDetails)) } attr_reader :customer_details - sig { returns(T.nilable(String)) } + # Indicates whether the customer was present in your checkout flow during this payment. - attr_reader :customer_presence sig { returns(T.nilable(String)) } + attr_reader :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PaymentMethodDetails)) } + # Information about the Payment Method debited for this payment. + sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - sig { returns(String) } + # ID of the Payment Record this Payment Attempt Record belongs to. + sig { returns(String) } attr_reader :payment_record - sig { returns(T.nilable(String)) } + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + sig { returns(T.nilable(String)) } attr_reader :payment_reference - sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this payment. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index 0b9d5efe1..d4029a04b 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -17,98 +17,170 @@ module Stripe class PaymentIntent < APIResource class AmountDetails < Stripe::StripeObject class Tip < Stripe::StripeObject + # Portion of the amount that corresponds to a tip. sig { returns(Integer) } attr_reader :amount end + # Attribute for field tip sig { returns(Tip) } attr_reader :tip end class AsyncWorkflows < Stripe::StripeObject class Inputs < Stripe::StripeObject class Tax < Stripe::StripeObject + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id sig { returns(String) } attr_reader :calculation end + # Attribute for field tax sig { returns(Tax) } attr_reader :tax end + # Attribute for field inputs sig { returns(Inputs) } attr_reader :inputs end class AutomaticPaymentMethods < Stripe::StripeObject + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. sig { returns(String) } attr_reader :allow_redirects + # Automatically calculates compatible payment methods sig { returns(T::Boolean) } attr_reader :enabled end class LastPaymentError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end class NextAction < Stripe::StripeObject class AlipayHandleRedirect < Stripe::StripeObject + # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. sig { returns(T.nilable(String)) } attr_reader :native_data + # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. sig { returns(T.nilable(String)) } attr_reader :native_url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. sig { returns(T.nilable(String)) } attr_reader :url end class BoletoDisplayDetails < Stripe::StripeObject + # The timestamp after which the boleto expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # The boleto number. sig { returns(T.nilable(String)) } attr_reader :number + # The URL to the downloadable boleto voucher PDF. sig { returns(T.nilable(String)) } attr_reader :pdf end class CardAwaitNotification < Stripe::StripeObject + # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. sig { returns(T.nilable(Integer)) } attr_reader :charge_attempt_at + # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. sig { returns(T.nilable(T::Boolean)) } attr_reader :customer_approval_required end class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject + # The date (unix timestamp) when the QR code expires. sig { returns(Integer) } attr_reader :expires_at + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. sig { returns(String) } attr_reader :hosted_instructions_url + # The url for mobile redirect based auth sig { returns(String) } attr_reader :mobile_auth_url + # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end @@ -116,1289 +188,2065 @@ module Stripe class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The ABA account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The ABA routing number sig { returns(String) } attr_reader :routing_number end class Iban < Stripe::StripeObject + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # The IBAN of the account. sig { returns(String) } attr_reader :iban end class SortCode < Stripe::StripeObject + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject + # The three-digit bank code sig { returns(String) } attr_reader :bank_code + # The short banking institution name sig { returns(String) } attr_reader :bank_name + # The CLABE number sig { returns(String) } attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The SWIFT code sig { returns(String) } attr_reader :swift_code end class Zengin < Stripe::StripeObject + # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name + # The account number sig { returns(T.nilable(String)) } attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type + # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code + # The bank name of the account sig { returns(T.nilable(String)) } attr_reader :bank_name + # The branch code of the account sig { returns(T.nilable(String)) } attr_reader :branch_code + # The branch name of the account sig { returns(T.nilable(String)) } attr_reader :branch_name end + # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. sig { returns(Iban) } attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. sig { returns(SortCode) } attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. sig { returns(Spei) } attr_reader :spei + # The payment networks supported by this FinancialAddress sig { returns(T::Array[String]) } attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. sig { returns(Swift) } attr_reader :swift + # The type of financial address sig { returns(String) } attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. sig { returns(Zengin) } attr_reader :zengin end + # The remaining amount that needs to be transferred to complete the payment. sig { returns(T.nilable(Integer)) } attr_reader :amount_remaining + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency + # A list of financial addresses that can be used to fund the customer balance sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses + # A link to a hosted page that guides your customer through completing the transfer. sig { returns(T.nilable(String)) } attr_reader :hosted_instructions_url + # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. sig { returns(T.nilable(String)) } attr_reader :reference + # Type of bank transfer sig { returns(String) } attr_reader :type end class KonbiniDisplayDetails < Stripe::StripeObject class Stores < Stripe::StripeObject class Familymart < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end class Lawson < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end class Ministop < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end class Seicomart < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end + # FamilyMart instruction details. sig { returns(T.nilable(Familymart)) } attr_reader :familymart + # Lawson instruction details. sig { returns(T.nilable(Lawson)) } attr_reader :lawson + # Ministop instruction details. sig { returns(T.nilable(Ministop)) } attr_reader :ministop + # Seicomart instruction details. sig { returns(T.nilable(Seicomart)) } attr_reader :seicomart end + # The timestamp at which the pending Konbini payment expires. sig { returns(Integer) } attr_reader :expires_at + # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # Attribute for field stores sig { returns(Stores) } attr_reader :stores end class MultibancoDisplayDetails < Stripe::StripeObject + # Entity number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :entity + # The timestamp at which the Multibanco voucher expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # Reference number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :reference end class OxxoDisplayDetails < Stripe::StripeObject + # The timestamp after which the OXXO voucher expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_after + # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # OXXO reference number. sig { returns(T.nilable(String)) } attr_reader :number end class PaynowDisplayQrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. sig { returns(T.nilable(String)) } attr_reader :hosted_instructions_url + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end class PixDisplayQrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The date (unix timestamp) when the PIX expires. sig { returns(Integer) } attr_reader :expires_at + # The URL to the hosted pix instructions page, which allows customers to view the pix QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The image_url_png string used to render png QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render svg QR code sig { returns(String) } attr_reader :image_url_svg end class PromptpayDisplayQrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The PNG path used to render the QR code, can be used as the source in an HTML img tag sig { returns(String) } attr_reader :image_url_png + # The SVG path used to render the QR code, can be used as the source in an HTML img tag sig { returns(String) } attr_reader :image_url_svg end class RedirectToUrl < Stripe::StripeObject + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. sig { returns(T.nilable(String)) } attr_reader :url end class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end + # The URL to the hosted Swish instructions page, which allows customers to view the QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). sig { returns(String) } attr_reader :mobile_auth_url + # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end class VerifyWithMicrodeposits < Stripe::StripeObject + # The timestamp when the microdeposits are expected to land. sig { returns(Integer) } attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. sig { returns(String) } attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. sig { returns(T.nilable(String)) } attr_reader :microdeposit_type end class WechatPayDisplayQrCode < Stripe::StripeObject + # The data being used to generate QR code sig { returns(String) } attr_reader :data + # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The base64 image data for a pre-generated QR code sig { returns(String) } attr_reader :image_data_url + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end class WechatPayRedirectToAndroidApp < Stripe::StripeObject + # app_id is the APP ID registered on WeChat open platform sig { returns(String) } attr_reader :app_id + # nonce_str is a random string sig { returns(String) } attr_reader :nonce_str + # package is static value sig { returns(String) } attr_reader :package + # an unique merchant ID assigned by WeChat Pay sig { returns(String) } attr_reader :partner_id + # an unique trading ID assigned by WeChat Pay sig { returns(String) } attr_reader :prepay_id + # A signature sig { returns(String) } attr_reader :sign + # Specifies the current time in epoch format sig { returns(String) } attr_reader :timestamp end class WechatPayRedirectToIosApp < Stripe::StripeObject + # An universal link that redirect to WeChat Pay app sig { returns(String) } attr_reader :native_url end + # Attribute for field alipay_handle_redirect sig { returns(AlipayHandleRedirect) } attr_reader :alipay_handle_redirect + # Attribute for field boleto_display_details sig { returns(BoletoDisplayDetails) } attr_reader :boleto_display_details + # Attribute for field card_await_notification sig { returns(CardAwaitNotification) } attr_reader :card_await_notification + # Attribute for field cashapp_handle_redirect_or_display_qr_code sig { returns(CashappHandleRedirectOrDisplayQrCode) } attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field display_bank_transfer_instructions sig { returns(DisplayBankTransferInstructions) } attr_reader :display_bank_transfer_instructions + # Attribute for field konbini_display_details sig { returns(KonbiniDisplayDetails) } attr_reader :konbini_display_details + # Attribute for field multibanco_display_details sig { returns(MultibancoDisplayDetails) } attr_reader :multibanco_display_details + # Attribute for field oxxo_display_details sig { returns(OxxoDisplayDetails) } attr_reader :oxxo_display_details + # Attribute for field paynow_display_qr_code sig { returns(PaynowDisplayQrCode) } attr_reader :paynow_display_qr_code + # Attribute for field pix_display_qr_code sig { returns(PixDisplayQrCode) } attr_reader :pix_display_qr_code + # Attribute for field promptpay_display_qr_code sig { returns(PromptpayDisplayQrCode) } attr_reader :promptpay_display_qr_code + # Attribute for field redirect_to_url sig { returns(RedirectToUrl) } attr_reader :redirect_to_url + # Attribute for field swish_handle_redirect_or_display_qr_code sig { returns(SwishHandleRedirectOrDisplayQrCode) } attr_reader :swish_handle_redirect_or_display_qr_code + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. sig { returns(String) } attr_reader :type + # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits + # Attribute for field wechat_pay_display_qr_code sig { returns(WechatPayDisplayQrCode) } attr_reader :wechat_pay_display_qr_code + # Attribute for field wechat_pay_redirect_to_android_app sig { returns(WechatPayRedirectToAndroidApp) } attr_reader :wechat_pay_redirect_to_android_app + # Attribute for field wechat_pay_redirect_to_ios_app sig { returns(WechatPayRedirectToIosApp) } attr_reader :wechat_pay_redirect_to_ios_app end class PaymentDetails < Stripe::StripeObject class CarRental < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject + # The email of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :email + # The name of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :name + # The phone number of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :phone end + # The delivery method for the payment sig { returns(String) } attr_reader :mode + # Attribute for field recipient sig { returns(Recipient) } attr_reader :recipient end class Driver < Stripe::StripeObject + # Full name of the driver on the reservation. sig { returns(String) } attr_reader :name end class PickupAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ReturnAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate + # The booking number associated with the car rental. sig { returns(String) } attr_reader :booking_number + # Class code of the car. sig { returns(String) } attr_reader :car_class_code + # Make of the car. sig { returns(String) } attr_reader :car_make + # Model of the car. sig { returns(String) } attr_reader :car_model + # The name of the rental car company. sig { returns(String) } attr_reader :company + # The customer service phone number of the car rental company. sig { returns(String) } attr_reader :customer_service_phone_number + # Number of days the car is being rented. sig { returns(Integer) } attr_reader :days_rented + # Attribute for field delivery sig { returns(Delivery) } attr_reader :delivery + # The details of the drivers associated with the trip. sig { returns(T::Array[Driver]) } attr_reader :drivers + # List of additional charges being billed. sig { returns(T::Array[String]) } attr_reader :extra_charges + # Indicates if the customer did not keep nor cancel their booking. sig { returns(T::Boolean) } attr_reader :no_show + # Attribute for field pickup_address sig { returns(PickupAddress) } attr_reader :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :pickup_at + # Rental rate. sig { returns(Integer) } attr_reader :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` sig { returns(String) } attr_reader :rate_interval + # The full name of the person or entity renting the car. sig { returns(String) } attr_reader :renter_name + # Attribute for field return_address sig { returns(ReturnAddress) } attr_reader :return_address + # Car return time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. sig { returns(T::Boolean) } attr_reader :tax_exempt end class EventDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject + # The email of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :email + # The name of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :name + # The phone number of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :phone end + # The delivery method for the payment sig { returns(String) } attr_reader :mode + # Attribute for field recipient sig { returns(Recipient) } attr_reader :recipient end + # Indicates if the tickets are digitally checked when entering the venue. sig { returns(T::Boolean) } attr_reader :access_controlled_venue + # Attribute for field address sig { returns(Address) } attr_reader :address + # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate + # The name of the company sig { returns(String) } attr_reader :company + # Attribute for field delivery sig { returns(Delivery) } attr_reader :delivery + # Event end time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :ends_at + # Type of the event entertainment (concert, sports event etc) sig { returns(String) } attr_reader :genre + # The name of the event. sig { returns(String) } attr_reader :name + # Event start time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :starts_at end class Subscription < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class BillingInterval < Stripe::StripeObject + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval end + # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate + # Info whether the subscription will be auto renewed upon expiry. sig { returns(T::Boolean) } attr_reader :auto_renewal + # Attribute for field billing_interval sig { returns(BillingInterval) } attr_reader :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription. sig { returns(String) } attr_reader :name + # Subscription start time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :starts_at end + # Attribute for field car_rental sig { returns(CarRental) } attr_reader :car_rental + # Attribute for field event_details sig { returns(EventDetails) } attr_reader :event_details + # Attribute for field subscription sig { returns(Subscription) } attr_reader :subscription end class PaymentMethodConfigurationDetails < Stripe::StripeObject + # ID of the payment method configuration used. sig { returns(String) } attr_reader :id + # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Affirm < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alma < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class AmazonPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Blik < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject class AvailablePlan < Stripe::StripeObject + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval + # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end class Plan < Stripe::StripeObject + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval + # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end + # Installment plans that may be selected for this PaymentIntent. sig { returns(T.nilable(T::Array[AvailablePlan])) } attr_reader :available_plans + # Whether Installments are enabled for this PaymentIntent. sig { returns(T::Boolean) } attr_reader :enabled + # Installment plan selected for this PaymentIntent. sig { returns(T.nilable(Plan)) } attr_reader :plan end class MandateOptions < Stripe::StripeObject + # Amount to be charged for future payments. sig { returns(Integer) } attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(String) } attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. sig { returns(T.nilable(Integer)) } attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. sig { returns(String) } attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. sig { returns(T.nilable(Integer)) } attr_reader :interval_count + # Unique identifier for the mandate or subscription. sig { returns(String) } attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. sig { returns(Integer) } attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. sig { returns(T.nilable(T::Array[String])) } attr_reader :supported_types end class StatementDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(String) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(String) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(String) } attr_reader :line2 + # ZIP or postal code. sig { returns(String) } attr_reader :postal_code + # State, county, province, or region. sig { returns(String) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Phone number sig { returns(String) } attr_reader :phone end + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } attr_reader :installments + # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } attr_reader :mandate_options + # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). sig { returns(T::Boolean) } attr_reader :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kanji + # Attribute for field statement_details sig { returns(StatementDetails) } attr_reader :statement_details end class CardPresent < Stripe::StripeObject class Routing < Stripe::StripeObject + # Requested routing priority sig { returns(T.nilable(String)) } attr_reader :requested_priority end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) sig { returns(T.nilable(T::Boolean)) } attr_reader :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. sig { returns(T.nilable(T::Boolean)) } attr_reader :request_incremental_authorization_support + # Attribute for field routing sig { returns(Routing) } attr_reader :routing end class Cashapp < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Gopay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class IdBankTransfer < Stripe::StripeObject + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. sig { returns(T.nilable(Integer)) } attr_reader :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class InteracPresent < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. sig { returns(T.nilable(String)) } attr_reader :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. sig { returns(T.nilable(String)) } attr_reader :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class MbWay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Oxxo < Stripe::StripeObject + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject + # The tax for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :amount + # The tax behavior for the line item. sig { returns(String) } attr_reader :behavior end + # Type of the line item. sig { returns(String) } attr_reader :category + # Description of the line item. sig { returns(String) } attr_reader :description + # Descriptive name of the line item. sig { returns(String) } attr_reader :name + # Quantity of the line item. Cannot be a negative number. sig { returns(Integer) } attr_reader :quantity + # Client facing stock keeping unit, article number or similar. sig { returns(String) } attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). sig { returns(String) } attr_reader :sold_by + # Attribute for field tax sig { returns(Tax) } attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :unit_amount end + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # The line items purchased by the customer. sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Pix < Stripe::StripeObject + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_seconds + # The timestamp at which the Pix expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Promptpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Qris < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Shopeepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Preferred language of the SOFORT authorization page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Swish < Stripe::StripeObject + # The order ID displayed in the Swish app after the payment is authorized. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Twint < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method sig { returns(String) } attr_reader :collection_method end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Preferred transaction settlement speed sig { returns(String) } attr_reader :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class WechatPay < Stripe::StripeObject + # The app ID registered with WeChat Pay. Only required when client is ios or android. sig { returns(T.nilable(String)) } attr_reader :app_id + # The client type that the end customer will pay from sig { returns(T.nilable(String)) } attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Zip < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay + # Attribute for field qris sig { returns(Qris) } attr_reader :qris + # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field twint sig { returns(Twint) } attr_reader :twint + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class Processing < Stripe::StripeObject class Card < Stripe::StripeObject class CustomerNotification < Stripe::StripeObject + # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. sig { returns(T.nilable(T::Boolean)) } attr_reader :approval_requested + # If customer approval is required, they need to provide approval before this time. sig { returns(T.nilable(Integer)) } attr_reader :completes_at end + # Attribute for field customer_notification sig { returns(CustomerNotification) } attr_reader :customer_notification end + # Attribute for field card sig { returns(Card) } attr_reader :card + # Type of the payment method for which payment is in `processing` state, one of `card`. sig { returns(String) } attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TransferData < Stripe::StripeObject + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount + # The account (if any) that the payment is attributed to for tax + # reporting, and where funds from the payment are transferred to after + # payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(Integer) } # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Amount that can be captured from this PaymentIntent. + sig { returns(Integer) } attr_reader :amount_capturable - sig { returns(AmountDetails) } + # Attribute for field amount_details + sig { returns(AmountDetails) } attr_reader :amount_details - sig { returns(Integer) } + # Amount that this PaymentIntent collects. + sig { returns(Integer) } attr_reader :amount_received - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(AsyncWorkflows) } + # Attribute for field async_workflows + sig { returns(AsyncWorkflows) } attr_reader :async_workflows - sig { returns(T.nilable(AutomaticPaymentMethods)) } + # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods - sig { returns(T.nilable(Integer)) } + # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - sig { returns(T.nilable(String)) } + # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + sig { returns(T.nilable(String)) } attr_reader :cancellation_reason - sig { returns(String) } + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } attr_reader :capture_method - sig { returns(T.nilable(String)) } + # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(String) } + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + sig { returns(String) } attr_reader :confirmation_method - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the Customer this PaymentIntent belongs to, if one exists. # # Payment methods attached to other Customers cannot be used with this PaymentIntent. # # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice that created this PaymentIntent, if it exists. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T.nilable(LastPaymentError)) } + # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + sig { returns(T.nilable(LastPaymentError)) } attr_reader :last_payment_error - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :latest_charge - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NextAction)) } + # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + sig { returns(T.nilable(NextAction)) } attr_reader :next_action - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(PaymentDetails) } + # Attribute for field payment_details + sig { returns(PaymentDetails) } attr_reader :payment_details - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the payment method used in this PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :payment_method - sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } attr_reader :payment_method_configuration_details - sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for this PaymentIntent. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T::Array[String]) } + # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + sig { returns(T::Array[String]) } attr_reader :payment_method_types - sig { returns(T.nilable(Processing)) } + # If present, this property tells you about the processing state of the payment. + sig { returns(T.nilable(Processing)) } attr_reader :processing - sig { returns(T.nilable(String)) } + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(T.nilable(String)) } attr_reader :receipt_email - sig { returns(T.nilable(T.any(String, Stripe::Review))) } + # ID of the review associated with this PaymentIntent, if any. + sig { returns(T.nilable(T.any(String, Stripe::Review))) } attr_reader :review - sig { returns(String) } + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + sig { returns(String) } attr_reader :secret_key_confirmation - sig { returns(T.nilable(String)) } + # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1406,31 +2254,39 @@ module Stripe # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } attr_reader :setup_future_usage - sig { returns(T.nilable(Shipping)) } + # Shipping information for this PaymentIntent. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping + + # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. attr_reader :source - sig { returns(T.nilable(String)) } + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix - sig { returns(String) } + # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(TransferData)) } + # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(String)) } + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + sig { returns(T.nilable(String)) } attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_link.rbi b/rbi/stripe/resources/payment_link.rbi index 2b51a69b1..10b1e63b1 100644 --- a/rbi/stripe/resources/payment_link.rbi +++ b/rbi/stripe/resources/payment_link.rbi @@ -11,332 +11,445 @@ module Stripe class PaymentLink < APIResource class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # The custom message that is displayed to the customer after the purchase is complete. sig { returns(T.nilable(String)) } attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the purchase is complete. sig { returns(String) } attr_reader :url end + # Attribute for field hosted_confirmation sig { returns(HostedConfirmation) } attr_reader :hosted_confirmation + # Attribute for field redirect sig { returns(Redirect) } attr_reader :redirect + # The specified behavior after the purchase is complete. sig { returns(String) } attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If `true`, tax will be calculated automatically using the customer's location. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. sig { returns(String) } attr_reader :position end + # Settings related to the payment method reuse text shown in the Checkout UI. sig { returns(T.nilable(PaymentMethodReuseAgreement)) } attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. sig { returns(T.nilable(String)) } attr_reader :promotions + # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject + # The label for the option, displayed to the customer. Up to 100 characters. sig { returns(String) } attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. sig { returns(String) } attr_reader :value end + # The options available for the customer to select. Up to 200 options allowed. sig { returns(T::Array[Option]) } attr_reader :options end class Label < Stripe::StripeObject + # Custom text for the label, displayed to the customer. Up to 50 characters. sig { returns(T.nilable(String)) } attr_reader :custom + # The type of the label. sig { returns(String) } attr_reader :type end class Numeric < Stripe::StripeObject + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length end class Text < Stripe::StripeObject + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length end + # Attribute for field dropdown sig { returns(Dropdown) } attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. sig { returns(String) } attr_reader :key + # Attribute for field label sig { returns(Label) } attr_reader :label + # Attribute for field numeric sig { returns(Numeric) } attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. sig { returns(T::Boolean) } attr_reader :optional + # Attribute for field text sig { returns(Text) } attr_reader :text + # The type of the field. sig { returns(String) } attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end + # Custom text that should be displayed after the payment confirmation button. sig { returns(T.nilable(AfterSubmit)) } attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. sig { returns(T.nilable(Submit)) } attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. sig { returns(T.nilable(TermsOfServiceAcceptance)) } attr_reader :terms_of_service_acceptance end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display end + # The account tax IDs associated with the invoice. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # A list of up to 4 custom fields to be displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Footer to be displayed on the invoice. sig { returns(T.nilable(String)) } attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # Options for invoice PDF rendering. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end + # Enable creating an invoice on successful payment. sig { returns(T::Boolean) } attr_reader :enabled + # Configuration for the invoice. Default invoice values will be used if unspecified. sig { returns(T.nilable(InvoiceData)) } attr_reader :invoice_data end class PaymentIntentData < Stripe::StripeObject + # Indicates when the funds will be captured from the customer's account. sig { returns(T.nilable(String)) } attr_reader :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # Indicates that you intend to make future payments with the payment method collected during checkout. sig { returns(T.nilable(String)) } attr_reader :setup_future_usage + # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. sig { returns(T.nilable(String)) } attr_reader :transfer_group end class PhoneNumberCollection < Stripe::StripeObject + # If `true`, a phone number will be collected during checkout. sig { returns(T::Boolean) } attr_reader :enabled end class Restrictions < Stripe::StripeObject class CompletedSessions < Stripe::StripeObject + # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. sig { returns(Integer) } attr_reader :count + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. sig { returns(Integer) } attr_reader :limit end + # Attribute for field completed_sessions sig { returns(CompletedSessions) } attr_reader :completed_sessions end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. sig { returns(T::Array[String]) } attr_reader :allowed_countries end class ShippingOption < Stripe::StripeObject + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :shipping_amount + # The ID of the Shipping Rate to use for this shipping option. sig { returns(T.any(String, Stripe::ShippingRate)) } attr_reader :shipping_rate end class SubscriptionData < Stripe::StripeObject class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. sig { returns(String) } attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. sig { returns(EndBehavior) } attr_reader :end_behavior end + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days + # Settings related to subscription trials. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class TaxIdCollection < Stripe::StripeObject + # Indicates whether tax ID collection is enabled for the session. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field required sig { returns(String) } attr_reader :required end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The connected account receiving the transfer. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T::Boolean) } # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(AfterCompletion) } + # Attribute for field after_completion + sig { returns(AfterCompletion) } attr_reader :after_completion - sig { returns(T::Boolean) } + # Whether user redeemable promotion codes are enabled. + sig { returns(T::Boolean) } attr_reader :allow_promotion_codes - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # The ID of the Connect application that created the Payment Link. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(T.nilable(Float)) } + # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(String) } + # Configuration for collecting the customer's billing address. Defaults to `auto`. + sig { returns(String) } attr_reader :billing_address_collection - sig { returns(T.nilable(ConsentCollection)) } + # When set, provides configuration to gather active consent from customers. + sig { returns(T.nilable(ConsentCollection)) } attr_reader :consent_collection - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T::Array[CustomField]) } + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[CustomField]) } attr_reader :custom_fields - sig { returns(CustomText) } + # Attribute for field custom_text + sig { returns(CustomText) } attr_reader :custom_text - sig { returns(String) } + # Configuration for Customer creation during checkout. - attr_reader :customer_creation sig { returns(String) } + attr_reader :customer_creation + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The custom message to be displayed to a customer when a payment link is no longer active. + sig { returns(T.nilable(String)) } attr_reader :inactive_message - sig { returns(T.nilable(InvoiceCreation)) } + # Configuration for creating invoice for payment mode payment links. + sig { returns(T.nilable(InvoiceCreation)) } attr_reader :invoice_creation - sig { returns(Stripe::ListObject) } + # The line items representing what is being sold. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(PaymentIntentData)) } + # Indicates the parameters to be passed to PaymentIntent creation during checkout. + sig { returns(T.nilable(PaymentIntentData)) } attr_reader :payment_intent_data - sig { returns(String) } + # Configuration for collecting a payment method during checkout. Defaults to `always`. + sig { returns(String) } attr_reader :payment_method_collection - sig { returns(T.nilable(T::Array[String])) } + # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types - sig { returns(PhoneNumberCollection) } + # Attribute for field phone_number_collection + sig { returns(PhoneNumberCollection) } attr_reader :phone_number_collection - sig { returns(T.nilable(Restrictions)) } + # Settings that restrict the usage of a payment link. + sig { returns(T.nilable(Restrictions)) } attr_reader :restrictions - sig { returns(T.nilable(ShippingAddressCollection)) } + # Configuration for collecting the customer's shipping address. + sig { returns(T.nilable(ShippingAddressCollection)) } attr_reader :shipping_address_collection - sig { returns(T::Array[ShippingOption]) } + # The shipping rate options applied to the session. + sig { returns(T::Array[ShippingOption]) } attr_reader :shipping_options - sig { returns(String) } + # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + sig { returns(String) } attr_reader :submit_type - sig { returns(T.nilable(SubscriptionData)) } + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + sig { returns(T.nilable(SubscriptionData)) } attr_reader :subscription_data - sig { returns(TaxIdCollection) } + # Attribute for field tax_id_collection + sig { returns(TaxIdCollection) } attr_reader :tax_id_collection - sig { returns(T.nilable(TransferData)) } + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(String) } + # The public URL that can be shared with customers. + sig { returns(String) } attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi index b98e52cb2..04669d7e0 100644 --- a/rbi/stripe/resources/payment_method.rbi +++ b/rbi/stripe/resources/payment_method.rbi @@ -10,14 +10,19 @@ module Stripe # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). class PaymentMethod < APIResource class AcssDebit < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Institution number of the bank account. sig { returns(T.nilable(String)) } attr_reader :institution_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end @@ -27,57 +32,77 @@ module Stripe class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # Six-digit number identifying bank and branch associated with this bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 end class BacsDebit < Stripe::StripeObject + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end @@ -85,105 +110,152 @@ module Stripe class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. sig { returns(String) } attr_reader :type end + # The charge that created this object. sig { returns(T.nilable(String)) } attr_reader :charge + # Transaction-specific details of the payment method used in the payment. sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. sig { returns(T::Boolean) } attr_reader :supported end @@ -194,199 +266,287 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type + # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand + # Checks on Card address and CVC if provided. sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. sig { returns(T.nilable(String)) } attr_reader :display_brand + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } attr_reader :funding + # Details of the original PaymentMethod that created this object. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(String) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Contains details on how this Card may be used for 3D Secure authentication. sig { returns(T.nilable(ThreeDSecureUsage)) } attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject + # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank end class Fpx < Stripe::StripeObject + # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank end @@ -394,80 +554,112 @@ module Stripe class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field display_name sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. sig { returns(T.nilable(String)) } attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end + # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end + # The customer's date of birth, if provided. sig { returns(T.nilable(Dob)) } attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject + # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject + # Account owner's email address. sig { returns(T.nilable(String)) } attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(String) } attr_reader :persistent_token end @@ -475,31 +667,42 @@ module Stripe class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. sig { returns(String) } attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. sig { returns(T.nilable(String)) } attr_reader :bank end class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end @@ -507,18 +710,23 @@ module Stripe class Promptpay < Stripe::StripeObject; end class Qris < Stripe::StripeObject; end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. sig { returns(String) } attr_reader :session end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(Integer) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(Integer) } attr_reader :month + # The four-digit year of birth. sig { returns(Integer) } attr_reader :year end + # Attribute for field dob sig { returns(Dob) } attr_reader :dob end @@ -526,26 +734,35 @@ module Stripe class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject + # The ID of the Charge that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country end @@ -553,229 +770,305 @@ module Stripe class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject + # The preferred network. sig { returns(T.nilable(String)) } attr_reader :preferred + # All supported networks. sig { returns(T::Array[String]) } attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject + # The ACH network code that resulted in this block. sig { returns(T.nilable(String)) } attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked sig { returns(T.nilable(String)) } attr_reader :reason end + # Attribute for field blocked sig { returns(Blocked) } attr_reader :blocked end + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account number of the bank account. sig { returns(T.nilable(String)) } attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # The name of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. sig { returns(T.nilable(String)) } attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about US bank account networks that can be used. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(Affirm) } + # Attribute for field affirm + sig { returns(Affirm) } attr_reader :affirm - sig { returns(AfterpayClearpay) } + # Attribute for field afterpay_clearpay + sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - sig { returns(Alipay) } + # Attribute for field alipay + sig { returns(Alipay) } attr_reader :alipay - sig { returns(String) } + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + sig { returns(String) } attr_reader :allow_redisplay - sig { returns(Alma) } + # Attribute for field alma + sig { returns(Alma) } attr_reader :alma - sig { returns(AmazonPay) } + # Attribute for field amazon_pay + sig { returns(AmazonPay) } attr_reader :amazon_pay - sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit + sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - sig { returns(BacsDebit) } + # Attribute for field bacs_debit + sig { returns(BacsDebit) } attr_reader :bacs_debit - sig { returns(Bancontact) } + # Attribute for field bancontact + sig { returns(Bancontact) } attr_reader :bancontact - sig { returns(BillingDetails) } + # Attribute for field billing_details + sig { returns(BillingDetails) } attr_reader :billing_details - sig { returns(Blik) } + # Attribute for field blik + sig { returns(Blik) } attr_reader :blik - sig { returns(Boleto) } + # Attribute for field boleto + sig { returns(Boleto) } attr_reader :boleto - sig { returns(Card) } + # Attribute for field card + sig { returns(Card) } attr_reader :card - sig { returns(CardPresent) } + # Attribute for field card_present + sig { returns(CardPresent) } attr_reader :card_present - sig { returns(Cashapp) } + # Attribute for field cashapp + sig { returns(Cashapp) } attr_reader :cashapp - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(CustomerBalance) } + # Attribute for field customer_balance + sig { returns(CustomerBalance) } attr_reader :customer_balance - sig { returns(Eps) } + # Attribute for field eps + sig { returns(Eps) } attr_reader :eps - sig { returns(Fpx) } + # Attribute for field fpx + sig { returns(Fpx) } attr_reader :fpx - sig { returns(Giropay) } + # Attribute for field giropay + sig { returns(Giropay) } attr_reader :giropay - sig { returns(Gopay) } + # Attribute for field gopay + sig { returns(Gopay) } attr_reader :gopay - sig { returns(Grabpay) } + # Attribute for field grabpay + sig { returns(Grabpay) } attr_reader :grabpay - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(IdBankTransfer) } + # Attribute for field id_bank_transfer + sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - sig { returns(Ideal) } + # Attribute for field ideal + sig { returns(Ideal) } attr_reader :ideal - sig { returns(InteracPresent) } + # Attribute for field interac_present + sig { returns(InteracPresent) } attr_reader :interac_present - sig { returns(KakaoPay) } + # Attribute for field kakao_pay + sig { returns(KakaoPay) } attr_reader :kakao_pay - sig { returns(Klarna) } + # Attribute for field klarna + sig { returns(Klarna) } attr_reader :klarna - sig { returns(Konbini) } + # Attribute for field konbini + sig { returns(Konbini) } attr_reader :konbini - sig { returns(KrCard) } + # Attribute for field kr_card + sig { returns(KrCard) } attr_reader :kr_card - sig { returns(Link) } + # Attribute for field link + sig { returns(Link) } attr_reader :link - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(MbWay) } + # Attribute for field mb_way + sig { returns(MbWay) } attr_reader :mb_way - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(Mobilepay) } + # Attribute for field mobilepay + sig { returns(Mobilepay) } attr_reader :mobilepay - sig { returns(Multibanco) } + # Attribute for field multibanco + sig { returns(Multibanco) } attr_reader :multibanco - sig { returns(NaverPay) } + # Attribute for field naver_pay + sig { returns(NaverPay) } attr_reader :naver_pay - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Oxxo) } + # Attribute for field oxxo + sig { returns(Oxxo) } attr_reader :oxxo - sig { returns(P24) } + # Attribute for field p24 + sig { returns(P24) } attr_reader :p24 - sig { returns(Payco) } + # Attribute for field payco + sig { returns(Payco) } attr_reader :payco - sig { returns(Paynow) } + # Attribute for field paynow + sig { returns(Paynow) } attr_reader :paynow - sig { returns(Paypal) } + # Attribute for field paypal + sig { returns(Paypal) } attr_reader :paypal - sig { returns(Payto) } + # Attribute for field payto + sig { returns(Payto) } attr_reader :payto - sig { returns(Pix) } + # Attribute for field pix + sig { returns(Pix) } attr_reader :pix - sig { returns(Promptpay) } + # Attribute for field promptpay + sig { returns(Promptpay) } attr_reader :promptpay - sig { returns(Qris) } + # Attribute for field qris + sig { returns(Qris) } attr_reader :qris - sig { returns(RadarOptions) } + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(RadarOptions) } attr_reader :radar_options - sig { returns(Rechnung) } + # Attribute for field rechnung + sig { returns(Rechnung) } attr_reader :rechnung - sig { returns(RevolutPay) } + # Attribute for field revolut_pay + sig { returns(RevolutPay) } attr_reader :revolut_pay - sig { returns(SamsungPay) } + # Attribute for field samsung_pay + sig { returns(SamsungPay) } attr_reader :samsung_pay - sig { returns(SepaDebit) } + # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Shopeepay) } + # Attribute for field shopeepay + sig { returns(Shopeepay) } attr_reader :shopeepay - sig { returns(Sofort) } + # Attribute for field sofort + sig { returns(Sofort) } attr_reader :sofort - sig { returns(Swish) } + # Attribute for field swish + sig { returns(Swish) } attr_reader :swish - sig { returns(Twint) } + # Attribute for field twint + sig { returns(Twint) } attr_reader :twint - sig { returns(String) } + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } attr_reader :type - sig { returns(UsBankAccount) } + # Attribute for field us_bank_account + sig { returns(UsBankAccount) } attr_reader :us_bank_account - sig { returns(WechatPay) } + # Attribute for field wechat_pay + sig { returns(WechatPay) } attr_reader :wechat_pay - sig { returns(Zip) } + # Attribute for field zip + sig { returns(Zip) } attr_reader :zip end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_configuration.rbi b/rbi/stripe/resources/payment_method_configuration.rbi index ad627de89..4f06c0830 100644 --- a/rbi/stripe/resources/payment_method_configuration.rbi +++ b/rbi/stripe/resources/payment_method_configuration.rbi @@ -20,809 +20,1092 @@ module Stripe class PaymentMethodConfiguration < APIResource class AcssDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Affirm < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AfterpayClearpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Alipay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Alma < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AmazonPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class ApplePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AuBecsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class BacsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Bancontact < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Blik < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Boleto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Card < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class CartesBancaires < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Cashapp < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class CustomerBalance < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Eps < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Fpx < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Giropay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class GooglePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Gopay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Grabpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class IdBankTransfer < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Ideal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Jcb < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Klarna < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Konbini < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Link < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Mobilepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Multibanco < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Oxxo < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class P24 < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Paynow < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Paypal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Payto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Promptpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Qris < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class RevolutPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class SepaDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Shopeepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Sofort < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Swish < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Twint < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class UsBankAccount < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class WechatPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Zip < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(T::Boolean) } + # Whether the configuration can be used for new payments. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Affirm) } + # Attribute for field affirm + sig { returns(Affirm) } attr_reader :affirm - sig { returns(AfterpayClearpay) } + # Attribute for field afterpay_clearpay + sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - sig { returns(Alipay) } + # Attribute for field alipay + sig { returns(Alipay) } attr_reader :alipay - sig { returns(Alma) } + # Attribute for field alma + sig { returns(Alma) } attr_reader :alma - sig { returns(AmazonPay) } + # Attribute for field amazon_pay + sig { returns(AmazonPay) } attr_reader :amazon_pay - sig { returns(ApplePay) } + # Attribute for field apple_pay + sig { returns(ApplePay) } attr_reader :apple_pay - sig { returns(T.nilable(String)) } + # For child configs, the Connect application associated with the configuration. + sig { returns(T.nilable(String)) } attr_reader :application - sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit + sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - sig { returns(BacsDebit) } + # Attribute for field bacs_debit + sig { returns(BacsDebit) } attr_reader :bacs_debit - sig { returns(Bancontact) } + # Attribute for field bancontact + sig { returns(Bancontact) } attr_reader :bancontact - sig { returns(Blik) } + # Attribute for field blik + sig { returns(Blik) } attr_reader :blik - sig { returns(Boleto) } + # Attribute for field boleto + sig { returns(Boleto) } attr_reader :boleto - sig { returns(Card) } + # Attribute for field card + sig { returns(Card) } attr_reader :card - sig { returns(CartesBancaires) } + # Attribute for field cartes_bancaires + sig { returns(CartesBancaires) } attr_reader :cartes_bancaires - sig { returns(Cashapp) } + # Attribute for field cashapp + sig { returns(Cashapp) } attr_reader :cashapp - sig { returns(CustomerBalance) } + # Attribute for field customer_balance + sig { returns(CustomerBalance) } attr_reader :customer_balance - sig { returns(Eps) } + # Attribute for field eps + sig { returns(Eps) } attr_reader :eps - sig { returns(Fpx) } + # Attribute for field fpx + sig { returns(Fpx) } attr_reader :fpx - sig { returns(Giropay) } + # Attribute for field giropay + sig { returns(Giropay) } attr_reader :giropay - sig { returns(GooglePay) } + # Attribute for field google_pay + sig { returns(GooglePay) } attr_reader :google_pay - sig { returns(Gopay) } + # Attribute for field gopay + sig { returns(Gopay) } attr_reader :gopay - sig { returns(Grabpay) } + # Attribute for field grabpay + sig { returns(Grabpay) } attr_reader :grabpay - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(IdBankTransfer) } + # Attribute for field id_bank_transfer + sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - sig { returns(Ideal) } + # Attribute for field ideal + sig { returns(Ideal) } attr_reader :ideal - sig { returns(T::Boolean) } + # The default configuration is used whenever a payment method configuration is not specified. + sig { returns(T::Boolean) } attr_reader :is_default - sig { returns(Jcb) } + # Attribute for field jcb + sig { returns(Jcb) } attr_reader :jcb - sig { returns(Klarna) } + # Attribute for field klarna + sig { returns(Klarna) } attr_reader :klarna - sig { returns(Konbini) } + # Attribute for field konbini + sig { returns(Konbini) } attr_reader :konbini - sig { returns(Link) } + # Attribute for field link + sig { returns(Link) } attr_reader :link - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Mobilepay) } + # Attribute for field mobilepay + sig { returns(Mobilepay) } attr_reader :mobilepay - sig { returns(Multibanco) } + # Attribute for field multibanco + sig { returns(Multibanco) } attr_reader :multibanco - sig { returns(String) } + # The configuration's name. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Oxxo) } + # Attribute for field oxxo + sig { returns(Oxxo) } attr_reader :oxxo - sig { returns(P24) } + # Attribute for field p24 + sig { returns(P24) } attr_reader :p24 - sig { returns(T.nilable(String)) } + # For child configs, the configuration's parent configuration. + sig { returns(T.nilable(String)) } attr_reader :parent - sig { returns(Paynow) } + # Attribute for field paynow + sig { returns(Paynow) } attr_reader :paynow - sig { returns(Paypal) } + # Attribute for field paypal + sig { returns(Paypal) } attr_reader :paypal - sig { returns(Payto) } + # Attribute for field payto + sig { returns(Payto) } attr_reader :payto - sig { returns(Promptpay) } + # Attribute for field promptpay + sig { returns(Promptpay) } attr_reader :promptpay - sig { returns(Qris) } + # Attribute for field qris + sig { returns(Qris) } attr_reader :qris - sig { returns(RevolutPay) } + # Attribute for field revolut_pay + sig { returns(RevolutPay) } attr_reader :revolut_pay - sig { returns(SepaDebit) } + # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Shopeepay) } + # Attribute for field shopeepay + sig { returns(Shopeepay) } attr_reader :shopeepay - sig { returns(Sofort) } + # Attribute for field sofort + sig { returns(Sofort) } attr_reader :sofort - sig { returns(Swish) } + # Attribute for field swish + sig { returns(Swish) } attr_reader :swish - sig { returns(Twint) } + # Attribute for field twint + sig { returns(Twint) } attr_reader :twint - sig { returns(UsBankAccount) } + # Attribute for field us_bank_account + sig { returns(UsBankAccount) } attr_reader :us_bank_account - sig { returns(WechatPay) } + # Attribute for field wechat_pay + sig { returns(WechatPay) } attr_reader :wechat_pay - sig { returns(Zip) } + # Attribute for field zip + sig { returns(Zip) } attr_reader :zip end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_domain.rbi b/rbi/stripe/resources/payment_method_domain.rbi index fe03b8a7a..520de023d 100644 --- a/rbi/stripe/resources/payment_method_domain.rbi +++ b/rbi/stripe/resources/payment_method_domain.rbi @@ -10,86 +10,111 @@ module Stripe class PaymentMethodDomain < APIResource class AmazonPay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class ApplePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class GooglePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class Link < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class Paypal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end - sig { returns(AmazonPay) } # Indicates the status of a specific payment method on a payment method domain. + sig { returns(AmazonPay) } attr_reader :amazon_pay - sig { returns(ApplePay) } + # Indicates the status of a specific payment method on a payment method domain. + sig { returns(ApplePay) } attr_reader :apple_pay - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The domain name that this payment method domain object represents. + sig { returns(String) } attr_reader :domain_name - sig { returns(T::Boolean) } + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + sig { returns(T::Boolean) } attr_reader :enabled - sig { returns(GooglePay) } + # Indicates the status of a specific payment method on a payment method domain. + sig { returns(GooglePay) } attr_reader :google_pay - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Link) } + # Indicates the status of a specific payment method on a payment method domain. + sig { returns(Link) } attr_reader :link - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Paypal) } + # Indicates the status of a specific payment method on a payment method domain. + sig { returns(Paypal) } attr_reader :paypal end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_record.rbi b/rbi/stripe/resources/payment_record.rbi index 6c34020ac..13c5db4c8 100644 --- a/rbi/stripe/resources/payment_record.rbi +++ b/rbi/stripe/resources/payment_record.rbi @@ -9,157 +9,212 @@ module Stripe # more Payment Attempt Records, which represent individual attempts made on a payment network. class PaymentRecord < APIResource class AmountCanceled < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountFailed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountGuaranteed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRefunded < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRequested < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class CustomerDetails < Stripe::StripeObject + # ID of the Stripe Customer associated with this payment. sig { returns(T.nilable(String)) } attr_reader :customer + # The customer's email address. sig { returns(T.nilable(String)) } attr_reader :email + # The customer's name. sig { returns(T.nilable(String)) } attr_reader :name + # The customer's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The billing email associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :email + # The billing name associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :name + # The billing phone number associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :phone end class Custom < Stripe::StripeObject + # Display name for the custom (user-defined) payment method type used to make this payment. sig { returns(String) } attr_reader :display_name + # The custom payment method type associated with this payment. sig { returns(T.nilable(String)) } attr_reader :type end + # The billing details associated with the method of payment. sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. sig { returns(T.nilable(Custom)) } attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. sig { returns(T.nilable(String)) } attr_reader :payment_method + # The type of Payment Method used for this payment attempt. sig { returns(String) } attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The shipping recipient's name. sig { returns(T.nilable(String)) } attr_reader :name + # The shipping recipient's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(AmountCanceled) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountCanceled) } attr_reader :amount_canceled - sig { returns(AmountFailed) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountFailed) } attr_reader :amount_failed - sig { returns(AmountGuaranteed) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountGuaranteed) } attr_reader :amount_guaranteed - sig { returns(AmountRefunded) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountRefunded) } attr_reader :amount_refunded - sig { returns(AmountRequested) } + # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountRequested) } attr_reader :amount_requested - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CustomerDetails)) } + # Customer information for this payment. + sig { returns(T.nilable(CustomerDetails)) } attr_reader :customer_details - sig { returns(T.nilable(String)) } + # Indicates whether the customer was present in your checkout flow during this payment. - attr_reader :customer_presence sig { returns(T.nilable(String)) } + attr_reader :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # ID of the latest Payment Attempt Record attached to this Payment Record. + sig { returns(String) } attr_reader :latest_payment_attempt_record - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PaymentMethodDetails)) } + # Information about the Payment Method debited for this payment. + sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - sig { returns(T.nilable(String)) } + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + sig { returns(T.nilable(String)) } attr_reader :payment_reference - sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this payment. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details end end \ No newline at end of file diff --git a/rbi/stripe/resources/payout.rbi b/rbi/stripe/resources/payout.rbi index dfd1615fa..81a0341af 100644 --- a/rbi/stripe/resources/payout.rbi +++ b/rbi/stripe/resources/payout.rbi @@ -13,88 +13,115 @@ module Stripe # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) class Payout < APIResource class TraceId < Stripe::StripeObject + # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. sig { returns(String) } attr_reader :status + # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. sig { returns(T.nilable(String)) } attr_reader :value end - sig { returns(Integer) } # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } + # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } attr_reader :application_fee - sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(Integer) } + # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + sig { returns(Integer) } attr_reader :arrival_date - sig { returns(T::Boolean) } + # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + sig { returns(T::Boolean) } attr_reader :automatic - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this payout on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) } + # ID of the bank account or card the payout is sent to. + sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) } attr_reader :destination - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :failure_balance_transaction - sig { returns(T.nilable(String)) } + # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code + # Message that provides the reason for a payout failure, if available. + sig { returns(T.nilable(String)) } attr_reader :failure_message - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). - attr_reader :method sig { returns(String) } + attr_reader :method + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Payout))) } + # If the payout reverses another, this is the ID of the original payout. + sig { returns(T.nilable(T.any(String, Stripe::Payout))) } attr_reader :original_payout - sig { returns(String) } + # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + sig { returns(String) } attr_reader :reconciliation_status - sig { returns(T.nilable(T.any(String, Stripe::Payout))) } + # If the payout reverses, this is the ID of the payout that reverses this payout. + sig { returns(T.nilable(T.any(String, Stripe::Payout))) } attr_reader :reversed_by - sig { returns(String) } + # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + sig { returns(String) } attr_reader :source_type - sig { returns(T.nilable(String)) } + # Extra information about a payout that displays on the user's bank statement. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(String) } + # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(TraceId)) } + # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + sig { returns(T.nilable(TraceId)) } attr_reader :trace_id - sig { returns(String) } + # Can be `bank_account` or `card`. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/person.rbi b/rbi/stripe/resources/person.rbi index 0c747f1d8..927f934c9 100644 --- a/rbi/stripe/resources/person.rbi +++ b/rbi/stripe/resources/person.rbi @@ -11,285 +11,392 @@ module Stripe class Person < APIResource class AdditionalTosAcceptances < Stripe::StripeObject class Account < Stripe::StripeObject + # The Unix timestamp marking when the legal guardian accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the legal guardian accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the legal guardian accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # Details on the legal guardian's acceptance of the main Stripe service agreement. sig { returns(T.nilable(Account)) } attr_reader :account end class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressKana < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class AddressKanji < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. sig { returns(T::Array[String]) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class RegisteredAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Relationship < Stripe::StripeObject + # Whether the person is the authorizer of the account's representative. sig { returns(T.nilable(T::Boolean)) } attr_reader :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. sig { returns(T.nilable(T::Boolean)) } attr_reader :director + # Whether the person has significant responsibility to control, manage, or direct the organization. sig { returns(T.nilable(T::Boolean)) } attr_reader :executive + # Whether the person is the legal guardian of the account's representative. sig { returns(T.nilable(T::Boolean)) } attr_reader :legal_guardian + # Whether the person is an owner of the account’s legal entity. sig { returns(T.nilable(T::Boolean)) } attr_reader :owner + # The percent owned by the person of the account's legal entity. sig { returns(T.nilable(Float)) } attr_reader :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } attr_reader :representative + # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } attr_reader :title end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T::Array[String]) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class Verification < Stripe::StripeObject class AdditionalDocument < Stripe::StripeObject + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end class Document < Stripe::StripeObject + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. sig { returns(T.nilable(AdditionalDocument)) } attr_reader :additional_document + # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. sig { returns(T.nilable(String)) } attr_reader :details_code + # Attribute for field document sig { returns(Document) } attr_reader :document + # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. sig { returns(String) } attr_reader :status end - sig { returns(String) } # The account the person is associated with. + sig { returns(String) } attr_reader :account - sig { returns(AdditionalTosAcceptances) } + # Attribute for field additional_tos_acceptances + sig { returns(AdditionalTosAcceptances) } attr_reader :additional_tos_acceptances - sig { returns(Address) } + # Attribute for field address + sig { returns(Address) } attr_reader :address - sig { returns(T.nilable(AddressKana)) } + # The Kana variation of the person's address (Japan only). + sig { returns(T.nilable(AddressKana)) } attr_reader :address_kana - sig { returns(T.nilable(AddressKanji)) } + # The Kanji variation of the person's address (Japan only). + sig { returns(T.nilable(AddressKanji)) } attr_reader :address_kanji - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Dob) } + # Attribute for field dob + sig { returns(Dob) } attr_reader :dob - sig { returns(T.nilable(String)) } + # The person's email address. - attr_reader :email sig { returns(T.nilable(String)) } + attr_reader :email + # The person's first name. - attr_reader :first_name sig { returns(T.nilable(String)) } + attr_reader :first_name + # The Kana variation of the person's first name (Japan only). - attr_reader :first_name_kana sig { returns(T.nilable(String)) } + attr_reader :first_name_kana + # The Kanji variation of the person's first name (Japan only). + sig { returns(T.nilable(String)) } attr_reader :first_name_kanji - sig { returns(T::Array[String]) } + # A list of alternate names or aliases that the person is known by. + sig { returns(T::Array[String]) } attr_reader :full_name_aliases - sig { returns(T.nilable(FutureRequirements)) } + # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + sig { returns(T.nilable(FutureRequirements)) } attr_reader :future_requirements - sig { returns(T.nilable(String)) } + # The person's gender. + sig { returns(T.nilable(String)) } attr_reader :gender - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). - attr_reader :id_number_provided sig { returns(T::Boolean) } + attr_reader :id_number_provided + # Whether the person's `id_number_secondary` was provided. + sig { returns(T::Boolean) } attr_reader :id_number_secondary_provided - sig { returns(T.nilable(String)) } + # The person's last name. - attr_reader :last_name sig { returns(T.nilable(String)) } + attr_reader :last_name + # The Kana variation of the person's last name (Japan only). - attr_reader :last_name_kana sig { returns(T.nilable(String)) } + attr_reader :last_name_kana + # The Kanji variation of the person's last name (Japan only). - attr_reader :last_name_kanji sig { returns(T.nilable(String)) } + attr_reader :last_name_kanji + # The person's maiden name. + sig { returns(T.nilable(String)) } attr_reader :maiden_name - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # The country where the person is a national. + sig { returns(T.nilable(String)) } attr_reader :nationality - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The person's phone number. + sig { returns(T.nilable(String)) } attr_reader :phone - sig { returns(String) } + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } attr_reader :political_exposure - sig { returns(RegisteredAddress) } + # Attribute for field registered_address + sig { returns(RegisteredAddress) } attr_reader :registered_address - sig { returns(Relationship) } + # Attribute for field relationship + sig { returns(Relationship) } attr_reader :relationship - sig { returns(T.nilable(Requirements)) } + # Information about the requirements for this person, including what information needs to be collected, and by when. + sig { returns(T.nilable(Requirements)) } attr_reader :requirements - sig { returns(T::Boolean) } + # Whether the last four digits of the person's Social Security number have been provided (U.S. only). + sig { returns(T::Boolean) } attr_reader :ssn_last_4_provided - sig { returns(Verification) } + # Attribute for field verification + sig { returns(Verification) } attr_reader :verification - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi index 247c12a81..a25bcdb97 100644 --- a/rbi/stripe/resources/plan.rbi +++ b/rbi/stripe/resources/plan.rbi @@ -13,88 +13,116 @@ module Stripe # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). class Plan < APIResource class Tier < Stripe::StripeObject + # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end class TransformUsage < Stripe::StripeObject + # Divide usage by this number. sig { returns(Integer) } attr_reader :divide_by + # After division, either round the result `up` or `down`. sig { returns(String) } attr_reader :round end - sig { returns(T::Boolean) } # Whether the plan can be used for new purchases. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(T.nilable(String)) } + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + sig { returns(T.nilable(String)) } attr_reader :aggregate_usage - sig { returns(T.nilable(Integer)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(Integer)) } attr_reader :amount - sig { returns(T.nilable(String)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(String)) } attr_reader :amount_decimal - sig { returns(String) } + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } attr_reader :billing_scheme - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + sig { returns(String) } attr_reader :interval - sig { returns(Integer) } + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + sig { returns(Integer) } attr_reader :interval_count - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # The meter tracking the usage of a metered price - attr_reader :meter sig { returns(T.nilable(String)) } + attr_reader :meter + # A brief description of the plan, hidden from customers. + sig { returns(T.nilable(String)) } attr_reader :nickname - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Product))) } + # The product whose pricing this plan determines. + sig { returns(T.nilable(T.any(String, Stripe::Product))) } attr_reader :product - sig { returns(T::Array[Tier]) } + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[Tier]) } attr_reader :tiers - sig { returns(T.nilable(String)) } + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + sig { returns(T.nilable(String)) } attr_reader :tiers_mode - sig { returns(T.nilable(TransformUsage)) } + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + sig { returns(T.nilable(TransformUsage)) } attr_reader :transform_usage - sig { returns(T.nilable(Integer)) } + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days - sig { returns(String) } + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + sig { returns(String) } attr_reader :usage_type - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi index 7e012570b..59d7228ac 100644 --- a/rbi/stripe/resources/price.rbi +++ b/rbi/stripe/resources/price.rbi @@ -12,152 +12,206 @@ module Stripe class Price < APIResource class CurrencyOptions < Stripe::StripeObject class CustomUnitAmount < Stripe::StripeObject + # The maximum unit amount the customer can specify for this item. sig { returns(T.nilable(Integer)) } attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. sig { returns(T.nilable(Integer)) } attr_reader :minimum + # The starting unit amount which can be updated by the customer. sig { returns(T.nilable(Integer)) } attr_reader :preset end class Tier < Stripe::StripeObject + # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(CustomUnitAmount)) } attr_reader :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. sig { returns(T.nilable(String)) } attr_reader :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. sig { returns(T::Array[Tier]) } attr_reader :tiers + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal end class CustomUnitAmount < Stripe::StripeObject + # The maximum unit amount the customer can specify for this item. sig { returns(T.nilable(Integer)) } attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. sig { returns(T.nilable(Integer)) } attr_reader :minimum + # The starting unit amount which can be updated by the customer. sig { returns(T.nilable(Integer)) } attr_reader :preset end class MigrateTo < Stripe::StripeObject + # The behavior controlling at what point in the subscription lifecycle to migrate the price sig { returns(String) } attr_reader :behavior + # The unix timestamp after at which subscriptions will start to migrate to the new price. sig { returns(Integer) } attr_reader :effective_after + # The id of the price being migrated to sig { returns(String) } attr_reader :price end class Recurring < Stripe::StripeObject + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. sig { returns(T.nilable(String)) } attr_reader :aggregate_usage + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } attr_reader :interval_count + # The meter tracking the usage of a metered price sig { returns(T.nilable(String)) } attr_reader :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. sig { returns(String) } attr_reader :usage_type end class Tier < Stripe::StripeObject + # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end class TransformQuantity < Stripe::StripeObject + # Divide usage by this number. sig { returns(Integer) } attr_reader :divide_by + # After division, either round the result `up` or `down`. sig { returns(String) } attr_reader :round end - sig { returns(T::Boolean) } # Whether the price can be used for new purchases. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(String) } + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } attr_reader :billing_scheme - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T::Hash[String, CurrencyOptions]) } + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options - sig { returns(T.nilable(CustomUnitAmount)) } + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(T.nilable(CustomUnitAmount)) } attr_reader :custom_unit_amount - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + sig { returns(T.nilable(String)) } attr_reader :lookup_key - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(MigrateTo)) } + # Subscriptions using this price will be migrated to use the new referenced price. + sig { returns(T.nilable(MigrateTo)) } attr_reader :migrate_to - sig { returns(T.nilable(String)) } + # A brief description of the price, hidden from customers. + sig { returns(T.nilable(String)) } attr_reader :nickname - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Product)) } + # The ID of the product this price is associated with. + sig { returns(T.any(String, Stripe::Product)) } attr_reader :product - sig { returns(T.nilable(Recurring)) } + # The recurring components of a price such as `interval` and `usage_type`. + sig { returns(T.nilable(Recurring)) } attr_reader :recurring - sig { returns(T.nilable(String)) } + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(T.nilable(String)) } attr_reader :tax_behavior - sig { returns(T::Array[Tier]) } + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[Tier]) } attr_reader :tiers - sig { returns(T.nilable(String)) } + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + sig { returns(T.nilable(String)) } attr_reader :tiers_mode - sig { returns(T.nilable(TransformQuantity)) } + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + sig { returns(T.nilable(TransformQuantity)) } attr_reader :transform_quantity - sig { returns(String) } + # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Integer)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - sig { returns(T.nilable(String)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi index ce669dfed..3bae61c88 100644 --- a/rbi/stripe/resources/product.rbi +++ b/rbi/stripe/resources/product.rbi @@ -13,99 +13,130 @@ module Stripe # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) class Product < APIResource class MarketingFeature < Stripe::StripeObject + # The marketing feature name. Up to 80 characters long. sig { returns(String) } attr_reader :name end class PackageDimensions < Stripe::StripeObject + # Height, in inches. sig { returns(Float) } attr_reader :height + # Length, in inches. sig { returns(Float) } attr_reader :length + # Weight, in ounces. sig { returns(Float) } attr_reader :weight + # Width, in inches. sig { returns(Float) } attr_reader :width end class Provisioning < Stripe::StripeObject class GiftCard < Stripe::StripeObject class FixedAmount < Stripe::StripeObject + # The initial amount with which the provisioned gift card will be created. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end + # Attribute for field fixed_amount sig { returns(T.nilable(FixedAmount)) } attr_reader :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. sig { returns(String) } attr_reader :type end + # Attribute for field gift_card sig { returns(T.nilable(GiftCard)) } attr_reader :gift_card + # The type of provisioning, only `gift_card` currently supported. sig { returns(String) } attr_reader :type end - sig { returns(T::Boolean) } # Whether the product is currently available for purchase. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Price))) } + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + sig { returns(T.nilable(T.any(String, Stripe::Price))) } attr_reader :default_price - sig { returns(T.nilable(String)) } + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Array[String]) } + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } attr_reader :images - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Array[MarketingFeature]) } + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + sig { returns(T::Array[MarketingFeature]) } attr_reader :marketing_features - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The product's name, meant to be displayable to the customer. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PackageDimensions)) } + # The dimensions of this product for shipping purposes. + sig { returns(T.nilable(PackageDimensions)) } attr_reader :package_dimensions - sig { returns(T.nilable(Provisioning)) } + # Provisioning configuration for this product. + sig { returns(T.nilable(Provisioning)) } attr_reader :provisioning - sig { returns(T.nilable(T::Boolean)) } + # Whether this product is shipped (i.e., physical goods). + sig { returns(T.nilable(T::Boolean)) } attr_reader :shippable - sig { returns(T.nilable(String)) } + # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } attr_reader :tax_code - sig { returns(String) } + # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(T.nilable(String)) } attr_reader :unit_label - sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated - sig { returns(T.nilable(String)) } + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } attr_reader :url - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/product_feature.rbi b/rbi/stripe/resources/product_feature.rbi index cdb0717a8..09ad339bd 100644 --- a/rbi/stripe/resources/product_feature.rbi +++ b/rbi/stripe/resources/product_feature.rbi @@ -6,21 +6,25 @@ module Stripe # A product_feature represents an attachment between a feature and a product. # When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. class ProductFeature < APIResource - sig { returns(Stripe::Entitlements::Feature) } # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + sig { returns(Stripe::Entitlements::Feature) } attr_reader :entitlement_feature - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/promotion_code.rbi b/rbi/stripe/resources/promotion_code.rbi index 4c84a56a7..5e02944a0 100644 --- a/rbi/stripe/resources/promotion_code.rbi +++ b/rbi/stripe/resources/promotion_code.rbi @@ -8,58 +8,75 @@ module Stripe class PromotionCode < APIResource class Restrictions < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). sig { returns(Integer) } attr_reader :minimum_amount end + # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices sig { returns(T::Boolean) } attr_reader :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). sig { returns(T.nilable(Integer)) } attr_reader :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount sig { returns(T.nilable(String)) } attr_reader :minimum_amount_currency end - sig { returns(T::Boolean) } # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(String) } + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + sig { returns(String) } attr_reader :code - sig { returns(Stripe::Coupon) } + # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + sig { returns(Stripe::Coupon) } attr_reader :coupon - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer that this promotion code can be used by. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(Integer)) } + # Date at which the promotion code can no longer be redeemed. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(Integer)) } + # Maximum number of times this promotion code can be redeemed. + sig { returns(T.nilable(Integer)) } attr_reader :max_redemptions - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Restrictions) } + # Attribute for field restrictions + sig { returns(Restrictions) } attr_reader :restrictions - sig { returns(Integer) } + # Number of times this promotion code has been used. + sig { returns(Integer) } attr_reader :times_redeemed end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index 219e73629..e95cced4f 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -8,30 +8,40 @@ module Stripe class Quote < APIResource class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Automatically calculate taxes sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this quote. sig { returns(T.nilable(String)) } attr_reader :status end class Computed < Stripe::StripeObject class LastReestimationDetails < Stripe::StripeObject class Failed < Stripe::StripeObject + # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. sig { returns(T.nilable(String)) } attr_reader :failure_code + # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". sig { returns(T.nilable(String)) } attr_reader :message + # The reason the reestimation failed. sig { returns(String) } attr_reader :reason end + # When `status` is `failed`, provides details about the quote reestimation failure. sig { returns(T.nilable(Failed)) } attr_reader :failed + # Latest status of the reestimation. sig { returns(String) } attr_reader :status end @@ -39,43 +49,65 @@ module Stripe class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end + # Total before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } attr_reader :interval_count + # Attribute for field total_details sig { returns(TotalDetails) } attr_reader :total_details end @@ -83,134 +115,190 @@ module Stripe class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end + # Total before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. sig { returns(Stripe::ListObject) } attr_reader :line_items + # Attribute for field total_details sig { returns(TotalDetails) } attr_reader :total_details end + # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. sig { returns(T.nilable(LastReestimationDetails)) } attr_reader :last_reestimation_details + # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. sig { returns(T.nilable(Recurring)) } attr_reader :recurring + # The time at which the quote's estimated schedules and upcoming invoices were generated. sig { returns(T.nilable(Integer)) } attr_reader :updated_at + # Attribute for field upfront sig { returns(Upfront) } attr_reader :upfront end class FromQuote < Stripe::StripeObject + # Whether this quote is a revision of a different quote. sig { returns(T::Boolean) } attr_reader :is_revision + # The quote that was cloned. sig { returns(T.any(String, Stripe::Quote)) } attr_reader :quote end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class StatusDetails < Stripe::StripeObject class Canceled < Stripe::StripeObject + # The reason this quote was marked as canceled. sig { returns(T.nilable(String)) } attr_reader :reason + # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :transitioned_at end class Stale < Stripe::StripeObject class LastReason < Stripe::StripeObject class LinesInvalid < Stripe::StripeObject + # The timestamp at which the lines were marked as invalid. sig { returns(Integer) } attr_reader :invalid_at + # The list of lines that became invalid at the given timestamp. sig { returns(T::Array[String]) } attr_reader :lines end class SubscriptionChanged < Stripe::StripeObject + # The subscription's state before the quote was marked as stale. sig { returns(T.nilable(Stripe::Subscription)) } attr_reader :previous_subscription end class SubscriptionScheduleChanged < Stripe::StripeObject + # The subscription schedule's state before the quote was marked as stale. sig { returns(T.nilable(Stripe::SubscriptionSchedule)) } attr_reader :previous_subscription_schedule end + # The ID of the line that is invalid if the stale reason type is `line_invalid`. sig { returns(String) } attr_reader :line_invalid + # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. sig { returns(T::Array[LinesInvalid]) } attr_reader :lines_invalid + # The user supplied mark stale reason. sig { returns(T.nilable(String)) } attr_reader :marked_stale + # The ID of the subscription that was canceled. sig { returns(String) } attr_reader :subscription_canceled + # Attribute for field subscription_changed sig { returns(SubscriptionChanged) } attr_reader :subscription_changed + # The ID of the subscription that was expired. sig { returns(String) } attr_reader :subscription_expired + # The ID of the subscription schedule that was canceled. sig { returns(String) } attr_reader :subscription_schedule_canceled + # Attribute for field subscription_schedule_changed sig { returns(SubscriptionScheduleChanged) } attr_reader :subscription_schedule_changed + # The ID of the subscription schedule that was released. sig { returns(String) } attr_reader :subscription_schedule_released + # The reason the quote was marked as stale. sig { returns(T.nilable(String)) } attr_reader :type end + # Time at which the quote expires. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # The most recent reason this quote was marked as stale. sig { returns(T.nilable(LastReason)) } attr_reader :last_reason + # Time at which the stale reason was updated. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :last_updated_at + # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :transitioned_at end + # Attribute for field canceled sig { returns(Canceled) } attr_reader :canceled + # Attribute for field stale sig { returns(Stale) } attr_reader :stale end class StatusTransitions < Stripe::StripeObject + # The time that the quote was accepted. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :accepted_at + # The time that the quote was canceled. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # The time that the quote was finalized. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at end @@ -218,311 +306,427 @@ module Stripe class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # The timestamp the given line starts at. sig { returns(T.nilable(LineStartsAt)) } attr_reader :line_starts_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_from` time. sig { returns(String) } attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration + # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_until` time. sig { returns(String) } attr_reader :type end + # The start of the period to bill from when the Quote is accepted. sig { returns(T.nilable(BillFrom)) } attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. sig { returns(T.nilable(BillUntil)) } attr_reader :bill_until end class Prebilling < Stripe::StripeObject + # Attribute for field iterations sig { returns(Integer) } attr_reader :iterations end + # Describes the period to bill for upon accepting the quote. sig { returns(T.nilable(BillOnAcceptance)) } attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # Whether the subscription will always start a new billing period when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. sig { returns(T.nilable(String)) } attr_reader :end_behavior + # The id of the subscription that will be updated when the quote is accepted. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. sig { returns(String) } attr_reader :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days end class SubscriptionDataOverride < Stripe::StripeObject class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # The timestamp the given line starts at. sig { returns(T.nilable(LineStartsAt)) } attr_reader :line_starts_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_from` time. sig { returns(String) } attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration + # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_until` time. sig { returns(String) } attr_reader :type end + # The start of the period to bill from when the Quote is accepted. sig { returns(T.nilable(BillFrom)) } attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. sig { returns(T.nilable(BillUntil)) } attr_reader :bill_until end + # Attribute for field applies_to sig { returns(AppliesTo) } attr_reader :applies_to + # Describes the period to bill for upon accepting the quote. sig { returns(T.nilable(BillOnAcceptance)) } attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. sig { returns(T.nilable(String)) } attr_reader :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Behavior of the subscription schedule and underlying subscription when it ends. sig { returns(T.nilable(String)) } attr_reader :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :proration_behavior end class SubscriptionSchedule < Stripe::StripeObject class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end + # Attribute for field applies_to sig { returns(AppliesTo) } attr_reader :applies_to + # The subscription schedule that was created or updated from this quote. sig { returns(String) } attr_reader :subscription_schedule end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T.nilable(T::Boolean)) } # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + sig { returns(T.nilable(T::Boolean)) } attr_reader :allow_backdated_lines - sig { returns(Integer) } + # Total before any discounts or taxes are applied. - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal + # Total after discounts and taxes are applied. + sig { returns(Integer) } attr_reader :amount_total - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the quote. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(T.nilable(Float)) } + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } attr_reader :collection_method - sig { returns(Computed) } + # Attribute for field computed + sig { returns(Computed) } attr_reader :computed - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) } + # The tax rates applied to this quote. + sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } + # A description that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to this quote. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(Integer) } + # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(T.nilable(String)) } + # A footer that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } attr_reader :footer - sig { returns(T.nilable(FromQuote)) } + # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + sig { returns(T.nilable(FromQuote)) } attr_reader :from_quote - sig { returns(T.nilable(String)) } + # A header that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } attr_reader :header - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The invoice that was created from this quote. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings + sig { returns(InvoiceSettings) } attr_reader :invoice_settings - sig { returns(Stripe::ListObject) } + # A list of items the customer is being quoted for. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T.nilable(T::Array[String])) } + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { returns(T.nilable(T::Array[String])) } attr_reader :lines - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } + # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + sig { returns(T.nilable(String)) } attr_reader :number - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(String) } + # The status of the quote. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(StatusDetails)) } + # Details on when and why a quote has been marked as stale or canceled. + sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that was created or updated from this quote. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(SubscriptionData) } + # Attribute for field subscription_data + sig { returns(SubscriptionData) } attr_reader :subscription_data - sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) } + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) } attr_reader :subscription_data_overrides - sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } + # The subscription schedule that was created or updated from this quote. + sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } attr_reader :subscription_schedule - sig { returns(T.nilable(T::Array[SubscriptionSchedule])) } + # The subscription schedules that were created or updated from this quote. + sig { returns(T.nilable(T::Array[SubscriptionSchedule])) } attr_reader :subscription_schedules - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this quote belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(TotalDetails) } + # Attribute for field total_details + sig { returns(TotalDetails) } attr_reader :total_details - sig { returns(T.nilable(TransferData)) } + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_line.rbi b/rbi/stripe/resources/quote_line.rbi index bdc5ec3e8..cde0f468c 100644 --- a/rbi/stripe/resources/quote_line.rbi +++ b/rbi/stripe/resources/quote_line.rbi @@ -8,260 +8,354 @@ module Stripe class Action < Stripe::StripeObject class AddDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. sig { returns(T.nilable(Integer)) } attr_reader :index + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class AddItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class RemoveDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class RemoveItem < Stripe::StripeObject + # ID of a price to remove. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price end class SetDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class SetItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end + # Details for the `add_discount` type. sig { returns(T.nilable(AddDiscount)) } attr_reader :add_discount + # Details for the `add_item` type. sig { returns(T.nilable(AddItem)) } attr_reader :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :add_metadata + # Details for the `remove_discount` type. sig { returns(T.nilable(RemoveDiscount)) } attr_reader :remove_discount + # Details for the `remove_item` type. sig { returns(T.nilable(RemoveItem)) } attr_reader :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. sig { returns(T.nilable(T::Array[String])) } attr_reader :remove_metadata + # Details for the `set_discounts` type. sig { returns(T.nilable(T::Array[SetDiscount])) } attr_reader :set_discounts + # Details for the `set_items` type. sig { returns(T.nilable(T::Array[SetItem])) } attr_reader :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :set_metadata + # The type of action the quote line performs. sig { returns(String) } attr_reader :type end class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class CancelSubscriptionSchedule < Stripe::StripeObject + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. sig { returns(String) } attr_reader :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. sig { returns(T.nilable(T::Boolean)) } attr_reader :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. sig { returns(T.nilable(T::Boolean)) } attr_reader :prorate end class EndsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. sig { returns(String) } attr_reader :discount end class Duration < Stripe::StripeObject + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Use the `end` time of a given discount. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # Select a way to pass in `ends_at`. sig { returns(String) } attr_reader :type end class SetPauseCollection < Stripe::StripeObject class Set < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(Set)) } attr_reader :set + # Defines the type of the pause_collection behavior for the quote line. sig { returns(String) } attr_reader :type end class StartsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. sig { returns(String) } attr_reader :discount end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Use the `end` time of a given discount. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # Select a way to pass in `starts_at`. sig { returns(String) } attr_reader :type end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end - sig { returns(T::Array[Action]) } # A list of items the customer is being quoted for. + sig { returns(T::Array[Action]) } attr_reader :actions - sig { returns(T.nilable(AppliesTo)) } + # Details to identify the subscription schedule the quote line applies to. + sig { returns(T.nilable(AppliesTo)) } attr_reader :applies_to - sig { returns(T.nilable(String)) } + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor - sig { returns(T.nilable(CancelSubscriptionSchedule)) } + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + sig { returns(T.nilable(CancelSubscriptionSchedule)) } attr_reader :cancel_subscription_schedule - sig { returns(T.nilable(EndsAt)) } + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + sig { returns(T.nilable(EndsAt)) } attr_reader :ends_at - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + sig { returns(T.nilable(String)) } attr_reader :proration_behavior - sig { returns(T.nilable(SetPauseCollection)) } + # Details to modify the pause_collection behavior of the subscription schedule. + sig { returns(T.nilable(SetPauseCollection)) } attr_reader :set_pause_collection - sig { returns(T.nilable(String)) } + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + sig { returns(T.nilable(String)) } attr_reader :set_schedule_end - sig { returns(T.nilable(StartsAt)) } + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(T.nilable(StartsAt)) } attr_reader :starts_at - sig { returns(T.nilable(TrialSettings)) } + # Settings related to subscription trials. + sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_invoice.rbi b/rbi/stripe/resources/quote_preview_invoice.rbi index 99adb00cc..a6015a825 100644 --- a/rbi/stripe/resources/quote_preview_invoice.rbi +++ b/rbi/stripe/resources/quote_preview_invoice.rbi @@ -37,134 +37,222 @@ module Stripe # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) class QuotePreviewInvoice < APIResource class AmountsDue < Stripe::StripeObject + # Incremental amount due for this payment in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. sig { returns(Integer) } attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Date on which a payment plan’s payment is due. sig { returns(T.nilable(Integer)) } attr_reader :due_date + # Timestamp when the payment was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` sig { returns(String) } attr_reader :status end class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. sig { returns(T.nilable(String)) } attr_reader :status end class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class CustomerAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end class FromInvoice < Stripe::StripeObject + # The relation between this invoice and the cloned invoice sig { returns(String) } attr_reader :action + # The invoice that was cloned. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class LastFinalizationError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end @@ -172,41 +260,53 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end + # Attribute for field installments sig { returns(Installments) } attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -216,234 +316,323 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Card)) } attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Konbini)) } attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. sig { returns(T.nilable(String)) } attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. sig { returns(T.nilable(String)) } attr_reader :page_size end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display + # Invoice pdf rendering options sig { returns(T.nilable(Pdf)) } attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. sig { returns(T.nilable(String)) } attr_reader :template + # Version of the rendering template that the invoice is using. sig { returns(T.nilable(Integer)) } attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject + # The time that the invoice draft was finalized. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at + # The time that the invoice was marked uncollectible. sig { returns(T.nilable(Integer)) } attr_reader :marked_uncollectible_at + # The time that the invoice was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The time that the invoice was voided. sig { returns(T.nilable(Integer)) } attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior + # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject + # The IDs of the line items that triggered the threshold invoice. sig { returns(T::Array[String]) } attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. sig { returns(Integer) } attr_reader :usage_gte end + # The total invoice amount threshold boundary if it triggered the threshold invoice. sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. sig { returns(T::Array[ItemReason]) } attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TotalTaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T.nilable(String)) } # The country of the business associated with this invoice, most often the business creating the invoice. - attr_reader :account_country sig { returns(T.nilable(String)) } + attr_reader :account_country + # The public name of the business associated with this invoice, most often the business creating the invoice. + sig { returns(T.nilable(String)) } attr_reader :account_name - sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - sig { returns(Integer) } + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. - attr_reader :amount_due sig { returns(Integer) } + attr_reader :amount_due + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. - attr_reader :amount_overpaid sig { returns(Integer) } + attr_reader :amount_overpaid + # The amount, in cents (or local equivalent), that was paid. - attr_reader :amount_paid sig { returns(Integer) } + attr_reader :amount_paid + # The difference between amount_due and amount_paid, in cents (or local equivalent). - attr_reader :amount_remaining sig { returns(Integer) } + attr_reader :amount_remaining + # This is the sum of all the shipping amounts. + sig { returns(Integer) } attr_reader :amount_shipping - sig { returns(T.nilable(T::Array[AmountsDue])) } + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + sig { returns(T.nilable(T::Array[AmountsDue])) } attr_reader :amounts_due - sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the invoice. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(AppliesTo) } + # Attribute for field applies_to + sig { returns(AppliesTo) } attr_reader :applies_to - sig { returns(Integer) } + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + sig { returns(Integer) } attr_reader :attempt_count - sig { returns(T::Boolean) } + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + sig { returns(T::Boolean) } attr_reader :attempted - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(Integer)) } + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + sig { returns(T.nilable(Integer)) } attr_reader :automatically_finalizes_at - sig { returns(T.nilable(String)) } + # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -453,212 +642,281 @@ module Stripe # * `subscription_threshold`: A subscription reached a billing threshold. # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + sig { returns(T.nilable(String)) } attr_reader :billing_reason - sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + sig { returns(String) } attr_reader :collection_method - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T::Array[CustomField])) } + # Custom fields displayed on the invoice. + sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - sig { returns(T.nilable(CustomerAddress)) } + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerAddress)) } attr_reader :customer_address - sig { returns(T.nilable(String)) } + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_email sig { returns(T.nilable(String)) } + attr_reader :customer_email + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_name sig { returns(T.nilable(String)) } + attr_reader :customer_name + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_phone - sig { returns(T.nilable(CustomerShipping)) } + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerShipping)) } attr_reader :customer_shipping - sig { returns(T.nilable(String)) } + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_tax_exempt - sig { returns(T.nilable(T::Array[CustomerTaxId])) } + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(T::Array[CustomerTaxId])) } attr_reader :customer_tax_ids - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :default_margins - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates applied to this invoice, if any. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(T.nilable(Integer)) } + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. - attr_reader :due_date sig { returns(T.nilable(Integer)) } + attr_reader :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - attr_reader :effective_at sig { returns(T.nilable(Integer)) } + attr_reader :effective_at + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(Integer)) } attr_reader :ending_balance - sig { returns(T.nilable(String)) } + # Footer displayed on the invoice. + sig { returns(T.nilable(String)) } attr_reader :footer - sig { returns(T.nilable(FromInvoice)) } + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + sig { returns(T.nilable(FromInvoice)) } attr_reader :from_invoice - sig { returns(String) } + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + sig { returns(String) } attr_reader :id - sig { returns(Issuer) } + # Attribute for field issuer + sig { returns(Issuer) } attr_reader :issuer - sig { returns(T.nilable(LastFinalizationError)) } + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + sig { returns(T.nilable(LastFinalizationError)) } attr_reader :last_finalization_error - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the most recent non-draft revision of this invoice + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :latest_revision - sig { returns(Stripe::ListObject) } + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + sig { returns(Stripe::ListObject) } attr_reader :lines - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(Integer)) } + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(Integer)) } attr_reader :next_payment_attempt - sig { returns(T.nilable(String)) } + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + sig { returns(T.nilable(String)) } attr_reader :number - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T::Boolean) } + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. - attr_reader :paid sig { returns(T::Boolean) } + attr_reader :paid + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + sig { returns(T::Boolean) } attr_reader :paid_out_of_band - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(PaymentSettings) } + # Attribute for field payment_settings + sig { returns(PaymentSettings) } attr_reader :payment_settings - sig { returns(Stripe::ListObject) } + # Payments for this invoice + sig { returns(Stripe::ListObject) } attr_reader :payments - sig { returns(Integer) } + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_end sig { returns(Integer) } + attr_reader :period_end + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_start sig { returns(Integer) } + attr_reader :period_start + # Total amount of all post-payment credit notes issued for this invoice. - attr_reader :post_payment_credit_notes_amount sig { returns(Integer) } + attr_reader :post_payment_credit_notes_amount + # Total amount of all pre-payment credit notes issued for this invoice. + sig { returns(Integer) } attr_reader :pre_payment_credit_notes_amount - sig { returns(T.nilable(T.any(String, Stripe::Quote))) } + # The quote this invoice was generated from. + sig { returns(T.nilable(T.any(String, Stripe::Quote))) } attr_reader :quote - sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this invoice. + sig { returns(T.nilable(String)) } attr_reader :receipt_number - sig { returns(T.nilable(Rendering)) } + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(T.nilable(Rendering)) } attr_reader :rendering - sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied on the invoice. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(Integer) } + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + sig { returns(Integer) } attr_reader :starting_balance - sig { returns(T.nilable(String)) } + # Extra information about an invoice for the customer's credit card statement. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # Attribute for field subscription + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(SubscriptionDetails)) } + # Details about the subscription that created this invoice. + sig { returns(T.nilable(SubscriptionDetails)) } attr_reader :subscription_details - sig { returns(Integer) } + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. - attr_reader :subscription_proration_date sig { returns(Integer) } + attr_reader :subscription_proration_date + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + sig { returns(Integer) } attr_reader :subtotal - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated - attr_reader :subtotal_excluding_tax sig { returns(T.nilable(Integer)) } + attr_reader :subtotal_excluding_tax + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + sig { returns(T.nilable(Integer)) } attr_reader :tax - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(ThresholdReason) } + # Attribute for field threshold_reason + sig { returns(ThresholdReason) } attr_reader :threshold_reason - sig { returns(Integer) } + # Total after discounts and taxes. + sig { returns(Integer) } attr_reader :total - sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } + # The aggregate amounts calculated per discount across all line items. + sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } attr_reader :total_discount_amounts - sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + sig { returns(T.nilable(Integer)) } attr_reader :total_excluding_tax - sig { returns(T.nilable(T::Array[TotalMarginAmount])) } + # The aggregate amounts calculated per margin across all line items. + sig { returns(T.nilable(T::Array[TotalMarginAmount])) } attr_reader :total_margin_amounts - sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } attr_reader :total_pretax_credit_amounts - sig { returns(T::Array[TotalTaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. + sig { returns(T::Array[TotalTaxAmount]) } attr_reader :total_tax_amounts - sig { returns(T.nilable(TransferData)) } + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(Integer)) } + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + sig { returns(T.nilable(Integer)) } attr_reader :webhooks_delivered_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi index 7561ba8e0..cc8aceac1 100644 --- a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +++ b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi @@ -5,90 +5,123 @@ module Stripe class QuotePreviewSubscriptionSchedule < APIResource class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class CurrentPhase < Stripe::StripeObject + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(String) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject + # The original price to be migrated. sig { returns(String) } attr_reader :source_price + # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end + # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at + # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions + # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end @@ -96,263 +129,361 @@ module Stripe class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end + # The stackable discounts that will be applied to the item. sig { returns(T::Array[Discount]) } attr_reader :discounts + # ID of the price used to generate the invoice item. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # The quantity of the invoice item. sig { returns(T.nilable(Integer)) } attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the plan to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Plan)) } attr_reader :plan + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. sig { returns(T::Array[AddInvoiceItem]) } attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The invoice settings applicable during this phase. sig { returns(T.nilable(InvoiceSettings)) } attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. sig { returns(T::Array[Item]) } attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. sig { returns(String) } attr_reader :proration_behavior + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries sig { returns(T.nilable(String)) } attr_reader :trial_continuation + # When the trial ends within the phase. sig { returns(T.nilable(Integer)) } attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class Prebilling < Stripe::StripeObject + # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end + # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the schedule. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(AppliesTo) } + # Attribute for field applies_to + sig { returns(AppliesTo) } attr_reader :applies_to - sig { returns(String) } + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } attr_reader :billing_behavior - sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. - attr_reader :canceled_at sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :completed_at - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CurrentPhase)) } + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + sig { returns(T.nilable(CurrentPhase)) } attr_reader :current_phase - sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription schedule. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(DefaultSettings) } + # Attribute for field default_settings + sig { returns(DefaultSettings) } attr_reader :default_settings - sig { returns(String) } + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - attr_reader :end_behavior sig { returns(String) } + attr_reader :end_behavior + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription schedule. + sig { returns(T.nilable(LastPriceMigrationError)) } attr_reader :last_price_migration_error - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Phase]) } + # Configuration for the subscription schedule's phases. + sig { returns(T::Array[Phase]) } attr_reader :phases - sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. + sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :released_at - sig { returns(T.nilable(String)) } + # ID of the subscription once managed by the subscription schedule (if it is released). + sig { returns(T.nilable(String)) } attr_reader :released_subscription - sig { returns(String) } + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # ID of the subscription managed by the subscription schedule. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription schedule belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock end end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/early_fraud_warning.rbi b/rbi/stripe/resources/radar/early_fraud_warning.rbi index 5908a679c..afeffa4e6 100644 --- a/rbi/stripe/resources/radar/early_fraud_warning.rbi +++ b/rbi/stripe/resources/radar/early_fraud_warning.rbi @@ -9,29 +9,36 @@ module Stripe # # Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) class EarlyFraudWarning < APIResource - sig { returns(T::Boolean) } # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + sig { returns(T::Boolean) } attr_reader :actionable - sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge this early fraud warning is for, optionally expanded. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. - attr_reader :fraud_type sig { returns(String) } + attr_reader :fraud_type + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::PaymentIntent)) } + # ID of the Payment Intent this early fraud warning is for, optionally expanded. + sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end end diff --git a/rbi/stripe/resources/radar/value_list.rbi b/rbi/stripe/resources/radar/value_list.rbi index 8d38f344b..e0bc8afd4 100644 --- a/rbi/stripe/resources/radar/value_list.rbi +++ b/rbi/stripe/resources/radar/value_list.rbi @@ -8,38 +8,48 @@ module Stripe # # Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) class ValueList < APIResource - sig { returns(String) } # The name of the value list for use in rules. + sig { returns(String) } attr_reader :alias - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The name or email address of the user who created this value list. - attr_reader :created_by sig { returns(String) } + attr_reader :created_by + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. + sig { returns(String) } attr_reader :item_type - sig { returns(Stripe::ListObject) } + # List of items contained within this value list. + sig { returns(Stripe::ListObject) } attr_reader :list_items - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The name of the value list. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end diff --git a/rbi/stripe/resources/radar/value_list_item.rbi b/rbi/stripe/resources/radar/value_list_item.rbi index 6b9e595c1..cc54eeaf9 100644 --- a/rbi/stripe/resources/radar/value_list_item.rbi +++ b/rbi/stripe/resources/radar/value_list_item.rbi @@ -8,29 +8,36 @@ module Stripe # # Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) class ValueListItem < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # The name or email address of the user who added this item to the value list. - attr_reader :created_by sig { returns(String) } + attr_reader :created_by + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The value of the item. - attr_reader :value sig { returns(String) } + attr_reader :value + # The identifier of the value list this item belongs to. + sig { returns(String) } attr_reader :value_list - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi index fdd1fc9e1..2b174d4b3 100644 --- a/rbi/stripe/resources/refund.rbi +++ b/rbi/stripe/resources/refund.rbi @@ -17,26 +17,35 @@ module Stripe class AmazonPay < Stripe::StripeObject; end class AuBankTransfer < Stripe::StripeObject; end class Blik < Stripe::StripeObject + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class BrBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Card < Stripe::StripeObject + # Value of the reference number assigned to the refund. sig { returns(String) } attr_reader :reference + # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(String) } attr_reader :reference_status + # Type of the reference number assigned to the refund. sig { returns(String) } attr_reader :reference_type + # The type of refund. This can be `refund`, `reversal`, or `pending`. sig { returns(String) } attr_reader :type end @@ -44,47 +53,61 @@ module Stripe class CustomerCashBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject; end class EuBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class GbBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class JpBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Klarna < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class MxBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class P24 < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end @@ -94,171 +117,236 @@ module Stripe class Revolut < Stripe::StripeObject; end class Sofort < Stripe::StripeObject; end class Swish < Stripe::StripeObject + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class ThBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class UsBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_bank_transfer sig { returns(AuBankTransfer) } attr_reader :au_bank_transfer + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field br_bank_transfer sig { returns(BrBankTransfer) } attr_reader :br_bank_transfer + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_cash_balance sig { returns(CustomerCashBalance) } attr_reader :customer_cash_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer sig { returns(GbBankTransfer) } attr_reader :gb_bank_transfer + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field jp_bank_transfer sig { returns(JpBankTransfer) } attr_reader :jp_bank_transfer + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field mx_bank_transfer sig { returns(MxBankTransfer) } attr_reader :mx_bank_transfer + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field revolut sig { returns(Revolut) } attr_reader :revolut + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field th_bank_transfer sig { returns(ThBankTransfer) } attr_reader :th_bank_transfer + # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_transfer sig { returns(UsBankTransfer) } attr_reader :us_bank_transfer + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class NextAction < Stripe::StripeObject class DisplayDetails < Stripe::StripeObject class EmailSent < Stripe::StripeObject + # The timestamp when the email was sent. sig { returns(Integer) } attr_reader :email_sent_at + # The recipient's email address. sig { returns(String) } attr_reader :email_sent_to end + # Attribute for field email_sent sig { returns(EmailSent) } attr_reader :email_sent + # The expiry timestamp. sig { returns(Integer) } attr_reader :expires_at end + # Attribute for field display_details sig { returns(DisplayDetails) } attr_reader :display_details + # Type of the next action to perform. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the charge that's refunded. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + sig { returns(String) } attr_reader :description - sig { returns(DestinationDetails) } + # Attribute for field destination_details + sig { returns(DestinationDetails) } attr_reader :destination_details - sig { returns(T.any(String, Stripe::BalanceTransaction)) } + # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :failure_balance_transaction - sig { returns(String) } + # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. - attr_reader :failure_reason sig { returns(String) } + attr_reader :failure_reason + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + sig { returns(String) } attr_reader :instructions_email - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(NextAction) } + # Attribute for field next_action + sig { returns(NextAction) } attr_reader :next_action - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent that's refunded. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(T.nilable(String)) } + # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). - attr_reader :reason sig { returns(T.nilable(String)) } + attr_reader :reason + # This is the transaction number that appears on email receipts sent for this refund. + sig { returns(T.nilable(String)) } attr_reader :receipt_number - sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } + # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } attr_reader :source_transfer_reversal - sig { returns(T.nilable(String)) } + # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } + # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } attr_reader :transfer_reversal end end \ No newline at end of file diff --git a/rbi/stripe/resources/reporting/report_run.rbi b/rbi/stripe/resources/reporting/report_run.rbi index c9a65293e..9c395519d 100644 --- a/rbi/stripe/resources/reporting/report_run.rbi +++ b/rbi/stripe/resources/reporting/report_run.rbi @@ -14,57 +14,74 @@ module Stripe # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). class ReportRun < APIResource class Parameters < Stripe::StripeObject + # The set of output columns requested for inclusion in the report run. sig { returns(T::Array[String]) } attr_reader :columns + # Connected account ID by which to filter the report run. sig { returns(String) } attr_reader :connected_account + # Currency of objects to be included in the report run. sig { returns(String) } attr_reader :currency + # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. sig { returns(Integer) } attr_reader :interval_end + # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. sig { returns(Integer) } attr_reader :interval_start + # Payout ID by which to filter the report run. sig { returns(String) } attr_reader :payout + # Category of balance transactions to be included in the report run. sig { returns(String) } attr_reader :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. sig { returns(String) } attr_reader :timezone end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # If something should go wrong during the run, a message about the failure (populated when # `status=failed`). + sig { returns(T.nilable(String)) } attr_reader :error - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # `true` if the report is run on live mode data and `false` if it is run on test mode data. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Parameters) } + # Attribute for field parameters + sig { returns(Parameters) } attr_reader :parameters - sig { returns(String) } + # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + sig { returns(String) } attr_reader :report_type - sig { returns(T.nilable(Stripe::File)) } + # The file object representing the result of the report run (populated when # `status=succeeded`). + sig { returns(T.nilable(Stripe::File)) } attr_reader :result - sig { returns(String) } + # Status of this report run. This will be `pending` when the run is initially created. # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(Integer)) } + # Timestamp at which this run successfully finished (populated when # `status=succeeded`). Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :succeeded_at end end diff --git a/rbi/stripe/resources/reporting/report_type.rbi b/rbi/stripe/resources/reporting/report_type.rbi index b8e3c9782..adaa3dfdb 100644 --- a/rbi/stripe/resources/reporting/report_type.rbi +++ b/rbi/stripe/resources/reporting/report_type.rbi @@ -13,32 +13,40 @@ module Stripe # Note that certain report types can only be run based on your live-mode data (not test-mode # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). class ReportType < APIResource - sig { returns(Integer) } # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. - attr_reader :data_available_end sig { returns(Integer) } + attr_reader :data_available_end + # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :data_available_start - sig { returns(T.nilable(T::Array[String])) } + # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + sig { returns(T.nilable(T::Array[String])) } attr_reader :default_columns - sig { returns(String) } + # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # Human-readable name of the Report Type - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # When this Report Type was latest updated. Measured in seconds since the Unix epoch. - attr_reader :updated sig { returns(Integer) } + attr_reader :updated + # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + sig { returns(Integer) } attr_reader :version end end diff --git a/rbi/stripe/resources/reserve_transaction.rbi b/rbi/stripe/resources/reserve_transaction.rbi index 5bec97e5b..d6676f703 100644 --- a/rbi/stripe/resources/reserve_transaction.rbi +++ b/rbi/stripe/resources/reserve_transaction.rbi @@ -4,20 +4,24 @@ # typed: true module Stripe class ReserveTransaction < APIResource - sig { returns(Integer) } # Attribute for field amount + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/reversal.rbi b/rbi/stripe/resources/reversal.rbi index bc5c1f4eb..04a7e5537 100644 --- a/rbi/stripe/resources/reversal.rbi +++ b/rbi/stripe/resources/reversal.rbi @@ -17,35 +17,44 @@ module Stripe # # Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) class Reversal < APIResource - sig { returns(Integer) } # Amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # Linked payment refund for the transfer reversal. + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } attr_reader :destination_payment_refund - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # ID of the refund responsible for the transfer reversal. + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } attr_reader :source_refund - sig { returns(T.any(String, Stripe::Transfer)) } + # ID of the transfer that was reversed. + sig { returns(T.any(String, Stripe::Transfer)) } attr_reader :transfer end end \ No newline at end of file diff --git a/rbi/stripe/resources/review.rbi b/rbi/stripe/resources/review.rbi index ea0280f45..da7ab09f2 100644 --- a/rbi/stripe/resources/review.rbi +++ b/rbi/stripe/resources/review.rbi @@ -9,68 +9,90 @@ module Stripe # [here](https://stripe.com/docs/radar/reviews). class Review < APIResource class IpAddressLocation < Stripe::StripeObject + # The city where the payment originated. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter ISO code representing the country where the payment originated. sig { returns(T.nilable(String)) } attr_reader :country + # The geographic latitude where the payment originated. sig { returns(T.nilable(Float)) } attr_reader :latitude + # The geographic longitude where the payment originated. sig { returns(T.nilable(Float)) } attr_reader :longitude + # The state/county/province/region where the payment originated. sig { returns(T.nilable(String)) } attr_reader :region end class Session < Stripe::StripeObject + # The browser used in this browser session (e.g., `Chrome`). sig { returns(T.nilable(String)) } attr_reader :browser + # Information about the device used for the browser session (e.g., `Samsung SM-G930T`). sig { returns(T.nilable(String)) } attr_reader :device + # The platform for the browser session (e.g., `Macintosh`). sig { returns(T.nilable(String)) } attr_reader :platform + # The version for the browser session (e.g., `61.0.3163.100`). sig { returns(T.nilable(String)) } attr_reader :version end - sig { returns(T.nilable(String)) } # The ZIP or postal code of the card used, if applicable. + sig { returns(T.nilable(String)) } attr_reader :billing_zip - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # The charge associated with this review. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - sig { returns(T.nilable(String)) } + # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + sig { returns(T.nilable(String)) } attr_reader :closed_reason - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The IP address where the payment originated. + sig { returns(T.nilable(String)) } attr_reader :ip_address - sig { returns(T.nilable(IpAddressLocation)) } + # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + sig { returns(T.nilable(IpAddressLocation)) } attr_reader :ip_address_location - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # If `true`, the review needs action. + sig { returns(T::Boolean) } attr_reader :open - sig { returns(String) } + # The reason the review was opened. One of `rule` or `manual`. + sig { returns(String) } attr_reader :opened_reason - sig { returns(T.any(String, Stripe::PaymentIntent)) } + # The PaymentIntent ID associated with this review, if one exists. + sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - sig { returns(String) } + # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + sig { returns(String) } attr_reader :reason - sig { returns(T.nilable(Session)) } + # Information related to the browsing session of the user who initiated the payment. + sig { returns(T.nilable(Session)) } attr_reader :session end end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi index e7b6da000..e945c8ef7 100644 --- a/rbi/stripe/resources/setup_attempt.rbi +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -14,120 +14,177 @@ module Stripe class AuBecsDebit < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject; end class Bancontact < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Boleto < Stripe::StripeObject; end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end class ThreeDSecure < Stripe::StripeObject + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. sig { returns(T.nilable(String)) } attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. sig { returns(T.nilable(String)) } attr_reader :electronic_commerce_indicator + # Indicates the outcome of 3D Secure authentication. sig { returns(T.nilable(String)) } attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. sig { returns(T.nilable(String)) } attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id + # The version of 3D Secure that was used. sig { returns(T.nilable(String)) } attr_reader :version end class Wallet < Stripe::StripeObject class ApplePay < Stripe::StripeObject; end class GooglePay < Stripe::StripeObject; end + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # Check results by Card networks on Card address and CVC at the time of authorization sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # Populated if this authorization used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end + # The ID of the Card PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_card + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline end class Cashapp < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # Bank where the account is located. sig { returns(T.nilable(String)) } attr_reader :bank + # Local bank code of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end @@ -140,145 +197,238 @@ module Stripe class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the Sofort authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Sofort directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class UsBankAccount < Stripe::StripeObject; end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class SetupError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T::Boolean) } + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } attr_reader :attach_to_self - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(T::Array[String])) } + # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T.nilable(T::Array[String])) } attr_reader :flow_directions - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.any(String, Stripe::PaymentMethod)) } + # ID of the payment method used with this SetupAttempt. + sig { returns(T.any(String, Stripe::PaymentMethod)) } attr_reader :payment_method - sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details + sig { returns(PaymentMethodDetails) } attr_reader :payment_method_details - sig { returns(T.nilable(SetupError)) } + # The error encountered during this attempt to confirm the SetupIntent, if any. + sig { returns(T.nilable(SetupError)) } attr_reader :setup_error - sig { returns(T.any(String, Stripe::SetupIntent)) } + # ID of the SetupIntent that this attempt belongs to. + sig { returns(T.any(String, Stripe::SetupIntent)) } attr_reader :setup_intent - sig { returns(String) } + # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. - attr_reader :status sig { returns(String) } + attr_reader :status + # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + sig { returns(String) } attr_reader :usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index 853b4535b..63f652694 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -26,321 +26,471 @@ module Stripe # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) class SetupIntent < APIResource class AutomaticPaymentMethods < Stripe::StripeObject + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. sig { returns(String) } attr_reader :allow_redirects + # Automatically calculates compatible payment methods sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end class LastSetupError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end class NextAction < Stripe::StripeObject class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject + # The date (unix timestamp) when the QR code expires. sig { returns(Integer) } attr_reader :expires_at + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. sig { returns(String) } attr_reader :hosted_instructions_url + # The url for mobile redirect based auth sig { returns(String) } attr_reader :mobile_auth_url + # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end class RedirectToUrl < Stripe::StripeObject + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate. sig { returns(T.nilable(String)) } attr_reader :url end class VerifyWithMicrodeposits < Stripe::StripeObject + # The timestamp when the microdeposits are expected to land. sig { returns(Integer) } attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. sig { returns(String) } attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. sig { returns(T.nilable(String)) } attr_reader :microdeposit_type end + # Attribute for field cashapp_handle_redirect_or_display_qr_code sig { returns(CashappHandleRedirectOrDisplayQrCode) } attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field redirect_to_url sig { returns(RedirectToUrl) } attr_reader :redirect_to_url + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. sig { returns(String) } attr_reader :type + # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits end class PaymentMethodConfigurationDetails < Stripe::StripeObject + # ID of the payment method configuration used. sig { returns(String) } attr_reader :id + # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. sig { returns(T::Array[String]) } attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Currency supported by the bank account sig { returns(T.nilable(String)) } attr_reader :currency + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class AmazonPay < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount to be charged for future payments. sig { returns(Integer) } attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(String) } attr_reader :amount_type + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. sig { returns(T.nilable(Integer)) } attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. sig { returns(String) } attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. sig { returns(T.nilable(Integer)) } attr_reader :interval_count + # Unique identifier for the mandate or subscription. sig { returns(String) } attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. sig { returns(Integer) } attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. sig { returns(T.nilable(T::Array[String])) } attr_reader :supported_types end + # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } attr_reader :mandate_options + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CardPresent < Stripe::StripeObject; end class Link < Stripe::StripeObject + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token end class Paypal < Stripe::StripeObject + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. sig { returns(T.nilable(String)) } attr_reader :billing_agreement_id + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method sig { returns(String) } attr_reader :collection_method end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect application that created the SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T::Boolean) } + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } attr_reader :attach_to_self - sig { returns(T.nilable(AutomaticPaymentMethods)) } + # Settings for dynamic payment methods compatible with this Setup Intent + sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods - sig { returns(T.nilable(String)) } + # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. - attr_reader :cancellation_reason sig { returns(T.nilable(String)) } + attr_reader :cancellation_reason + # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the Customer this SetupIntent belongs to, if one exists. # # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T::Array[String])) } + # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T.nilable(T::Array[String])) } attr_reader :flow_directions - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastSetupError)) } + # The error encountered in the previous SetupIntent confirmation. + sig { returns(T.nilable(LastSetupError)) } attr_reader :last_setup_error - sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + # The most recent SetupAttempt for this SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :latest_attempt - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + # ID of the multi use Mandate generated by the SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :mandate - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(NextAction)) } + # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + sig { returns(T.nilable(NextAction)) } attr_reader :next_action - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the setup is intended. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :payment_method - sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } attr_reader :payment_method_configuration_details - sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment method-specific configuration for this SetupIntent. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T::Array[String]) } + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + sig { returns(T::Array[String]) } attr_reader :payment_method_types - sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + # ID of the single_use Mandate generated by the SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :single_use_mandate - sig { returns(String) } + # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. - attr_reader :status sig { returns(String) } + attr_reader :status + # Indicates how the payment method is intended to be used in the future. # # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + sig { returns(String) } attr_reader :usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/shipping_rate.rbi b/rbi/stripe/resources/shipping_rate.rbi index 1b9b2c058..afdcd928c 100644 --- a/rbi/stripe/resources/shipping_rate.rbi +++ b/rbi/stripe/resources/shipping_rate.rbi @@ -8,71 +8,93 @@ module Stripe class ShippingRate < APIResource class DeliveryEstimate < Stripe::StripeObject class Maximum < Stripe::StripeObject + # A unit of time. sig { returns(String) } attr_reader :unit + # Must be greater than 0. sig { returns(Integer) } attr_reader :value end class Minimum < Stripe::StripeObject + # A unit of time. sig { returns(String) } attr_reader :unit + # Must be greater than 0. sig { returns(Integer) } attr_reader :value end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. sig { returns(T.nilable(Maximum)) } attr_reader :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. sig { returns(T.nilable(Minimum)) } attr_reader :minimum end class FixedAmount < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. sig { returns(String) } attr_reader :tax_behavior end + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options end - sig { returns(T::Boolean) } # Whether the shipping rate can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(DeliveryEstimate)) } + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(T.nilable(DeliveryEstimate)) } attr_reader :delivery_estimate - sig { returns(T.nilable(String)) } + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(T.nilable(String)) } attr_reader :display_name - sig { returns(FixedAmount) } + # Attribute for field fixed_amount + sig { returns(FixedAmount) } attr_reader :fixed_amount - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(T.nilable(String)) } attr_reader :tax_behavior - sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } attr_reader :tax_code - sig { returns(String) } + # The type of calculation to use on the shipping rate. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/sigma/scheduled_query_run.rbi b/rbi/stripe/resources/sigma/scheduled_query_run.rbi index 18025847d..8e12a1c57 100644 --- a/rbi/stripe/resources/sigma/scheduled_query_run.rbi +++ b/rbi/stripe/resources/sigma/scheduled_query_run.rbi @@ -10,41 +10,52 @@ module Stripe # retrieve the query results. class ScheduledQueryRun < APIResource class Error < Stripe::StripeObject + # Information about the run failure. sig { returns(String) } attr_reader :message end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created + # When the query was run, Sigma contained a snapshot of your Stripe data at this time. + sig { returns(Integer) } attr_reader :data_load_time - sig { returns(Error) } + # Attribute for field error + sig { returns(Error) } attr_reader :error - sig { returns(T.nilable(Stripe::File)) } + # The file object representing the results of the query. + sig { returns(T.nilable(Stripe::File)) } attr_reader :file - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # Time at which the result expires and is no longer available for download. + sig { returns(Integer) } attr_reader :result_available_until - sig { returns(String) } + # SQL for the query. - attr_reader :sql sig { returns(String) } + attr_reader :sql + # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. - attr_reader :status sig { returns(String) } + attr_reader :status + # Title of the query. + sig { returns(String) } attr_reader :title end end diff --git a/rbi/stripe/resources/source.rbi b/rbi/stripe/resources/source.rbi index 9116e3446..8ae072ca0 100644 --- a/rbi/stripe/resources/source.rbi +++ b/rbi/stripe/resources/source.rbi @@ -15,655 +15,930 @@ module Stripe # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). class Source < APIResource class AchCreditTransfer < Stripe::StripeObject + # Attribute for field account_number sig { returns(T.nilable(String)) } attr_reader :account_number + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name + # Attribute for field refund_account_holder_type sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_type + # Attribute for field refund_routing_number sig { returns(T.nilable(String)) } attr_reader :refund_routing_number + # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number + # Attribute for field swift_code sig { returns(T.nilable(String)) } attr_reader :swift_code end class AchDebit < Stripe::StripeObject + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number + # Attribute for field type sig { returns(T.nilable(String)) } attr_reader :type end class AcssDebit < Stripe::StripeObject + # Attribute for field bank_address_city sig { returns(T.nilable(String)) } attr_reader :bank_address_city + # Attribute for field bank_address_line_1 sig { returns(T.nilable(String)) } attr_reader :bank_address_line_1 + # Attribute for field bank_address_line_2 sig { returns(T.nilable(String)) } attr_reader :bank_address_line_2 + # Attribute for field bank_address_postal_code sig { returns(T.nilable(String)) } attr_reader :bank_address_postal_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field category sig { returns(T.nilable(String)) } attr_reader :category + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number end class Alipay < Stripe::StripeObject + # Attribute for field data_string sig { returns(T.nilable(String)) } attr_reader :data_string + # Attribute for field native_url sig { returns(T.nilable(String)) } attr_reader :native_url + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class AuBecsDebit < Stripe::StripeObject + # Attribute for field bsb_number sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 end class Bancontact < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Attribute for field preferred_language sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Card < Stripe::StripeObject + # Attribute for field address_line1_check sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # Attribute for field address_zip_check sig { returns(T.nilable(String)) } attr_reader :address_zip_check + # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field cvc_check sig { returns(T.nilable(String)) } attr_reader :cvc_check + # Attribute for field description sig { returns(String) } attr_reader :description + # Attribute for field dynamic_last4 sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint + # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding + # Attribute for field iin sig { returns(String) } attr_reader :iin + # Attribute for field issuer sig { returns(String) } attr_reader :issuer + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field name sig { returns(T.nilable(String)) } attr_reader :name + # Attribute for field three_d_secure sig { returns(String) } attr_reader :three_d_secure + # Attribute for field tokenization_method sig { returns(T.nilable(String)) } attr_reader :tokenization_method end class CardPresent < Stripe::StripeObject + # Attribute for field application_cryptogram sig { returns(String) } attr_reader :application_cryptogram + # Attribute for field application_preferred_name sig { returns(String) } attr_reader :application_preferred_name + # Attribute for field authorization_code sig { returns(T.nilable(String)) } attr_reader :authorization_code + # Attribute for field authorization_response_code sig { returns(String) } attr_reader :authorization_response_code + # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field cvm_type sig { returns(String) } attr_reader :cvm_type + # Attribute for field data_type sig { returns(T.nilable(String)) } attr_reader :data_type + # Attribute for field dedicated_file_name sig { returns(String) } attr_reader :dedicated_file_name + # Attribute for field description sig { returns(String) } attr_reader :description + # Attribute for field emv_auth_data sig { returns(String) } attr_reader :emv_auth_data + # Attribute for field evidence_customer_signature sig { returns(T.nilable(String)) } attr_reader :evidence_customer_signature + # Attribute for field evidence_transaction_certificate sig { returns(T.nilable(String)) } attr_reader :evidence_transaction_certificate + # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint + # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding + # Attribute for field iin sig { returns(String) } attr_reader :iin + # Attribute for field issuer sig { returns(String) } attr_reader :issuer + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field pos_device_id sig { returns(T.nilable(String)) } attr_reader :pos_device_id + # Attribute for field pos_entry_mode sig { returns(String) } attr_reader :pos_entry_mode + # Attribute for field read_method sig { returns(T.nilable(String)) } attr_reader :read_method + # Attribute for field reader sig { returns(T.nilable(String)) } attr_reader :reader + # Attribute for field terminal_verification_results sig { returns(String) } attr_reader :terminal_verification_results + # Attribute for field transaction_status_information sig { returns(String) } attr_reader :transaction_status_information end class CodeVerification < Stripe::StripeObject + # The number of attempts remaining to authenticate the source object with a verification code. sig { returns(Integer) } attr_reader :attempts_remaining + # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). sig { returns(String) } attr_reader :status end class Eps < Stripe::StripeObject + # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Giropay < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Ideal < Stripe::StripeObject + # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Klarna < Stripe::StripeObject + # Attribute for field background_image_url sig { returns(String) } attr_reader :background_image_url + # Attribute for field client_token sig { returns(T.nilable(String)) } attr_reader :client_token + # Attribute for field first_name sig { returns(String) } attr_reader :first_name + # Attribute for field last_name sig { returns(String) } attr_reader :last_name + # Attribute for field locale sig { returns(String) } attr_reader :locale + # Attribute for field logo_url sig { returns(String) } attr_reader :logo_url + # Attribute for field page_title sig { returns(String) } attr_reader :page_title + # Attribute for field pay_later_asset_urls_descriptive sig { returns(String) } attr_reader :pay_later_asset_urls_descriptive + # Attribute for field pay_later_asset_urls_standard sig { returns(String) } attr_reader :pay_later_asset_urls_standard + # Attribute for field pay_later_name sig { returns(String) } attr_reader :pay_later_name + # Attribute for field pay_later_redirect_url sig { returns(String) } attr_reader :pay_later_redirect_url + # Attribute for field pay_now_asset_urls_descriptive sig { returns(String) } attr_reader :pay_now_asset_urls_descriptive + # Attribute for field pay_now_asset_urls_standard sig { returns(String) } attr_reader :pay_now_asset_urls_standard + # Attribute for field pay_now_name sig { returns(String) } attr_reader :pay_now_name + # Attribute for field pay_now_redirect_url sig { returns(String) } attr_reader :pay_now_redirect_url + # Attribute for field pay_over_time_asset_urls_descriptive sig { returns(String) } attr_reader :pay_over_time_asset_urls_descriptive + # Attribute for field pay_over_time_asset_urls_standard sig { returns(String) } attr_reader :pay_over_time_asset_urls_standard + # Attribute for field pay_over_time_name sig { returns(String) } attr_reader :pay_over_time_name + # Attribute for field pay_over_time_redirect_url sig { returns(String) } attr_reader :pay_over_time_redirect_url + # Attribute for field payment_method_categories sig { returns(String) } attr_reader :payment_method_categories + # Attribute for field purchase_country sig { returns(String) } attr_reader :purchase_country + # Attribute for field purchase_type sig { returns(String) } attr_reader :purchase_type + # Attribute for field redirect_url sig { returns(String) } attr_reader :redirect_url + # Attribute for field shipping_delay sig { returns(Integer) } attr_reader :shipping_delay + # Attribute for field shipping_first_name sig { returns(String) } attr_reader :shipping_first_name + # Attribute for field shipping_last_name sig { returns(String) } attr_reader :shipping_last_name end class Multibanco < Stripe::StripeObject + # Attribute for field entity sig { returns(T.nilable(String)) } attr_reader :entity + # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference + # Attribute for field refund_account_holder_address_city sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name + # Attribute for field refund_iban sig { returns(T.nilable(String)) } attr_reader :refund_iban end class Owner < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class VerifiedAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's address. sig { returns(T.nilable(Address)) } attr_reader :address + # Owner's email address. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's full name. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(VerifiedAddress)) } attr_reader :verified_address + # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email + # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name + # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_phone end class P24 < Stripe::StripeObject + # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference end class Paypal < Stripe::StripeObject + # Attribute for field billing_agreement sig { returns(T.nilable(String)) } attr_reader :billing_agreement + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field payer_id sig { returns(T.nilable(String)) } attr_reader :payer_id + # Attribute for field reference_id sig { returns(String) } attr_reader :reference_id + # Attribute for field reference_transaction_amount sig { returns(String) } attr_reader :reference_transaction_amount + # Attribute for field reference_transaction_charged sig { returns(T::Boolean) } attr_reader :reference_transaction_charged + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # Attribute for field transaction_id sig { returns(String) } attr_reader :transaction_id + # Attribute for field verified_email sig { returns(T.nilable(String)) } attr_reader :verified_email end class Receiver < Stripe::StripeObject + # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. sig { returns(T.nilable(String)) } attr_reader :address + # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_charged + # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_received + # The total amount that was returned to the customer. The amount returned is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_returned + # Type of refund attribute method, one of `email`, `manual`, or `none`. sig { returns(String) } attr_reader :refund_attributes_method + # Type of refund attribute status, one of `missing`, `requested`, or `available`. sig { returns(String) } attr_reader :refund_attributes_status end class Redirect < Stripe::StripeObject + # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_reason + # The URL you provide to redirect the customer to after they authenticated their payment. sig { returns(String) } attr_reader :return_url + # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). sig { returns(String) } attr_reader :status + # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. sig { returns(String) } attr_reader :url end class SepaCreditTransfer < Stripe::StripeObject + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field iban sig { returns(T.nilable(String)) } attr_reader :iban + # Attribute for field refund_account_holder_address_city sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name + # Attribute for field refund_iban sig { returns(T.nilable(String)) } attr_reader :refund_iban end class SepaDebit < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field branch_code sig { returns(T.nilable(String)) } attr_reader :branch_code + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field mandate_reference sig { returns(T.nilable(String)) } attr_reader :mandate_reference + # Attribute for field mandate_url sig { returns(T.nilable(String)) } attr_reader :mandate_url end class Sofort < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Attribute for field preferred_language sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class SourceOrder < Stripe::StripeObject class Item < Stripe::StripeObject + # The amount (price) for this order item. sig { returns(T.nilable(Integer)) } attr_reader :amount + # This currency of this order item. Required when `amount` is present. sig { returns(T.nilable(String)) } attr_reader :currency + # Human-readable description for this order item. sig { returns(T.nilable(String)) } attr_reader :description + # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). sig { returns(T.nilable(String)) } attr_reader :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. sig { returns(Integer) } attr_reader :quantity + # The type of this order item. Must be `sku`, `tax`, or `shipping`. sig { returns(T.nilable(String)) } attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # The email address of the customer placing the order. sig { returns(String) } attr_reader :email + # List of items constituting the order. sig { returns(T.nilable(T::Array[Item])) } attr_reader :items + # Attribute for field shipping sig { returns(Shipping) } attr_reader :shipping end class ThreeDSecure < Stripe::StripeObject + # Attribute for field address_line1_check sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # Attribute for field address_zip_check sig { returns(T.nilable(String)) } attr_reader :address_zip_check + # Attribute for field authenticated sig { returns(T.nilable(T::Boolean)) } attr_reader :authenticated + # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand + # Attribute for field card sig { returns(T.nilable(String)) } attr_reader :card + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field customer sig { returns(T.nilable(String)) } attr_reader :customer + # Attribute for field cvc_check sig { returns(T.nilable(String)) } attr_reader :cvc_check + # Attribute for field description sig { returns(String) } attr_reader :description + # Attribute for field dynamic_last4 sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint + # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding + # Attribute for field iin sig { returns(String) } attr_reader :iin + # Attribute for field issuer sig { returns(String) } attr_reader :issuer + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field name sig { returns(T.nilable(String)) } attr_reader :name + # Attribute for field three_d_secure sig { returns(String) } attr_reader :three_d_secure + # Attribute for field tokenization_method sig { returns(T.nilable(String)) } attr_reader :tokenization_method end class Wechat < Stripe::StripeObject + # Attribute for field prepay_id sig { returns(String) } attr_reader :prepay_id + # Attribute for field qr_code_url sig { returns(T.nilable(String)) } attr_reader :qr_code_url + # Attribute for field statement_descriptor sig { returns(String) } attr_reader :statement_descriptor end - sig { returns(AchCreditTransfer) } # Attribute for field ach_credit_transfer + sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer - sig { returns(AchDebit) } + # Attribute for field ach_debit + sig { returns(AchDebit) } attr_reader :ach_debit - sig { returns(AcssDebit) } + # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(Alipay) } + # Attribute for field alipay + sig { returns(Alipay) } attr_reader :alipay - sig { returns(T.nilable(Integer)) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + sig { returns(T.nilable(Integer)) } attr_reader :amount - sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit + sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - sig { returns(Bancontact) } + # Attribute for field bancontact + sig { returns(Bancontact) } attr_reader :bancontact - sig { returns(Card) } + # Attribute for field card + sig { returns(Card) } attr_reader :card - sig { returns(CardPresent) } + # Attribute for field card_present + sig { returns(CardPresent) } attr_reader :card_present - sig { returns(String) } + # The client secret of the source. Used for client-side retrieval using a publishable key. + sig { returns(String) } attr_reader :client_secret - sig { returns(CodeVerification) } + # Attribute for field code_verification + sig { returns(CodeVerification) } attr_reader :code_verification - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(String) } + # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + sig { returns(String) } attr_reader :customer - sig { returns(Eps) } + # Attribute for field eps + sig { returns(Eps) } attr_reader :eps - sig { returns(String) } + # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + sig { returns(String) } attr_reader :flow - sig { returns(Giropay) } + # Attribute for field giropay + sig { returns(Giropay) } attr_reader :giropay - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Ideal) } + # Attribute for field ideal + sig { returns(Ideal) } attr_reader :ideal - sig { returns(Klarna) } + # Attribute for field klarna + sig { returns(Klarna) } attr_reader :klarna - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(Multibanco) } + # Attribute for field multibanco + sig { returns(Multibanco) } attr_reader :multibanco - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Owner)) } + # Information about the owner of the payment instrument that may be used or required by particular source types. + sig { returns(T.nilable(Owner)) } attr_reader :owner - sig { returns(P24) } + # Attribute for field p24 + sig { returns(P24) } attr_reader :p24 - sig { returns(Paypal) } + # Attribute for field paypal + sig { returns(Paypal) } attr_reader :paypal - sig { returns(Receiver) } + # Attribute for field receiver + sig { returns(Receiver) } attr_reader :receiver - sig { returns(Redirect) } + # Attribute for field redirect + sig { returns(Redirect) } attr_reader :redirect - sig { returns(SepaCreditTransfer) } + # Attribute for field sepa_credit_transfer + sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer - sig { returns(SepaDebit) } + # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Sofort) } + # Attribute for field sofort + sig { returns(Sofort) } attr_reader :sofort - sig { returns(SourceOrder) } + # Attribute for field source_order + sig { returns(SourceOrder) } attr_reader :source_order - sig { returns(T.nilable(String)) } + # Extra information about a source. This will appear on your customer's statement every time you charge the source. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(String) } + # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + sig { returns(String) } attr_reader :status - sig { returns(ThreeDSecure) } + # Attribute for field three_d_secure + sig { returns(ThreeDSecure) } attr_reader :three_d_secure - sig { returns(String) } + # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } + # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + sig { returns(T.nilable(String)) } attr_reader :usage - sig { returns(Wechat) } + # Attribute for field wechat + sig { returns(Wechat) } attr_reader :wechat end end \ No newline at end of file diff --git a/rbi/stripe/resources/source_mandate_notification.rbi b/rbi/stripe/resources/source_mandate_notification.rbi index 75df160c6..c998cb439 100644 --- a/rbi/stripe/resources/source_mandate_notification.rbi +++ b/rbi/stripe/resources/source_mandate_notification.rbi @@ -8,49 +8,62 @@ module Stripe # deliver an email to the customer. class SourceMandateNotification < APIResource class AcssDebit < Stripe::StripeObject + # The statement descriptor associate with the debit. sig { returns(String) } attr_reader :statement_descriptor end class BacsDebit < Stripe::StripeObject + # Last 4 digits of the account number associated with the debit. sig { returns(String) } attr_reader :last4 end class SepaDebit < Stripe::StripeObject + # SEPA creditor ID. sig { returns(String) } attr_reader :creditor_identifier + # Last 4 digits of the account number associated with the debit. sig { returns(String) } attr_reader :last4 + # Mandate reference associated with the debit. sig { returns(String) } attr_reader :mandate_reference end - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(T.nilable(Integer)) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + sig { returns(T.nilable(Integer)) } attr_reader :amount - sig { returns(BacsDebit) } + # Attribute for field bacs_debit + sig { returns(BacsDebit) } attr_reader :bacs_debit - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + sig { returns(String) } attr_reader :reason - sig { returns(SepaDebit) } + # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Stripe::Source) } + # `Source` objects allow you to accept a variety of payment methods. They # represent a customer's payment instrument, and can be used with the Stripe API # just like a `Card` object: once chargeable, they can be charged, or can be @@ -61,12 +74,15 @@ module Stripe # This newer API provides access to our latest features and payment method types. # # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + sig { returns(Stripe::Source) } attr_reader :source - sig { returns(String) } + # The status of the mandate notification. Valid statuses are `pending` or `submitted`. - attr_reader :status sig { returns(String) } + attr_reader :status + # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/source_transaction.rbi b/rbi/stripe/resources/source_transaction.rbi index 7345a49f6..c16822192 100644 --- a/rbi/stripe/resources/source_transaction.rbi +++ b/rbi/stripe/resources/source_transaction.rbi @@ -9,98 +9,132 @@ module Stripe # transactions. class SourceTransaction < StripeObject class AchCreditTransfer < Stripe::StripeObject + # Customer data associated with the transfer. sig { returns(String) } attr_reader :customer_data + # Bank account fingerprint associated with the transfer. sig { returns(String) } attr_reader :fingerprint + # Last 4 digits of the account number associated with the transfer. sig { returns(String) } attr_reader :last4 + # Routing number associated with the transfer. sig { returns(String) } attr_reader :routing_number end class ChfCreditTransfer < Stripe::StripeObject + # Reference associated with the transfer. sig { returns(String) } attr_reader :reference + # Sender's country address. sig { returns(String) } attr_reader :sender_address_country + # Sender's line 1 address. sig { returns(String) } attr_reader :sender_address_line1 + # Sender's bank account IBAN. sig { returns(String) } attr_reader :sender_iban + # Sender's name. sig { returns(String) } attr_reader :sender_name end class GbpCreditTransfer < Stripe::StripeObject + # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. sig { returns(String) } attr_reader :fingerprint + # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. sig { returns(String) } attr_reader :funding_method + # Last 4 digits of sender account number associated with the transfer. sig { returns(String) } attr_reader :last4 + # Sender entered arbitrary information about the transfer. sig { returns(String) } attr_reader :reference + # Sender account number associated with the transfer. sig { returns(String) } attr_reader :sender_account_number + # Sender name associated with the transfer. sig { returns(String) } attr_reader :sender_name + # Sender sort code associated with the transfer. sig { returns(String) } attr_reader :sender_sort_code end class PaperCheck < Stripe::StripeObject + # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. sig { returns(String) } attr_reader :available_at + # Comma-separated list of invoice IDs associated with the paper check. sig { returns(String) } attr_reader :invoices end class SepaCreditTransfer < Stripe::StripeObject + # Reference associated with the transfer. sig { returns(String) } attr_reader :reference + # Sender's bank account IBAN. sig { returns(String) } attr_reader :sender_iban + # Sender's name. sig { returns(String) } attr_reader :sender_name end - sig { returns(AchCreditTransfer) } # Attribute for field ach_credit_transfer + sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer - sig { returns(Integer) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + sig { returns(Integer) } attr_reader :amount - sig { returns(ChfCreditTransfer) } + # Attribute for field chf_credit_transfer + sig { returns(ChfCreditTransfer) } attr_reader :chf_credit_transfer - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(GbpCreditTransfer) } + # Attribute for field gbp_credit_transfer + sig { returns(GbpCreditTransfer) } attr_reader :gbp_credit_transfer - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(PaperCheck) } + # Attribute for field paper_check + sig { returns(PaperCheck) } attr_reader :paper_check - sig { returns(SepaCreditTransfer) } + # Attribute for field sepa_credit_transfer + sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer - sig { returns(String) } + # The ID of the source this transaction is attached to. - attr_reader :source sig { returns(String) } + attr_reader :source + # The status of the transaction, one of `succeeded`, `pending`, or `failed`. - attr_reader :status sig { returns(String) } + attr_reader :status + # The type of source this transaction is attached to. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index caeab2fc0..5e44d61ff 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -9,71 +9,96 @@ module Stripe class Subscription < APIResource class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on this subscription. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingCycleAnchorConfig < Stripe::StripeObject + # The day of the month of the billing_cycle_anchor. sig { returns(Integer) } attr_reader :day_of_month + # The hour of the day of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :hour + # The minute of the hour of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :minute + # The month to start full cycle billing periods. sig { returns(T.nilable(Integer)) } attr_reader :month + # The second of the minute of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :second end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class CancellationDetails < Stripe::StripeObject + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. sig { returns(T.nilable(String)) } attr_reader :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. sig { returns(T.nilable(String)) } attr_reader :feedback + # Why this subscription was canceled. sig { returns(T.nilable(String)) } attr_reader :reason end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject + # The original price to be migrated. sig { returns(String) } attr_reader :source_price + # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end + # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at + # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions + # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior + # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end @@ -81,47 +106,62 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount to be charged for future payments. sig { returns(T.nilable(Integer)) } attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(T.nilable(String)) } attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -131,220 +171,295 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact + # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Card)) } attr_reader :card + # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Konbini)) } attr_reader :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end + # Payment-method-specific configuration to provide to invoices created by the subscription. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. sig { returns(T.nilable(String)) } attr_reader :save_default_payment_method end class PendingInvoiceItemInterval < Stripe::StripeObject + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). sig { returns(Integer) } attr_reader :interval_count end class PendingUpdate < Stripe::StripeObject + # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. sig { returns(T.nilable(Integer)) } attr_reader :billing_cycle_anchor + # The point after which the changes reflected by this update will be discarded and no longer applied. sig { returns(Integer) } attr_reader :expires_at + # The number of iterations of prebilling to apply. sig { returns(T.nilable(Integer)) } attr_reader :prebilling_iterations + # List of subscription items, each with an attached plan, that will be set if the update is applied. sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) } attr_reader :subscription_items + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. sig { returns(T.nilable(Integer)) } attr_reader :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. sig { returns(T.nilable(T::Boolean)) } attr_reader :trial_from_plan end class Prebilling < Stripe::StripeObject + # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end + # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. sig { returns(String) } attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. sig { returns(EndBehavior) } attr_reader :end_behavior end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the subscription. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Float)) } + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - sig { returns(AutomaticTax) } + # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(Integer) } + # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + sig { returns(Integer) } attr_reader :billing_cycle_anchor - sig { returns(T.nilable(BillingCycleAnchorConfig)) } + # The fixed values used to calculate the `billing_cycle_anchor`. + sig { returns(T.nilable(BillingCycleAnchorConfig)) } attr_reader :billing_cycle_anchor_config - sig { returns(T.nilable(BillingThresholds)) } + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - sig { returns(T.nilable(Integer)) } + # A date in the future at which the subscription will automatically get canceled + sig { returns(T.nilable(Integer)) } attr_reader :cancel_at - sig { returns(T::Boolean) } + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + sig { returns(T::Boolean) } attr_reader :cancel_at_period_end - sig { returns(T.nilable(Integer)) } + # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - sig { returns(T.nilable(CancellationDetails)) } + # Details about why this subscription was cancelled + sig { returns(T.nilable(CancellationDetails)) } attr_reader :cancellation_details - sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + sig { returns(String) } attr_reader :collection_method - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(Integer) } + # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. - attr_reader :current_period_end sig { returns(Integer) } + attr_reader :current_period_end + # Start of the current period that the subscription has been invoiced for. + sig { returns(Integer) } attr_reader :current_period_start - sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(Integer)) } + # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_source - sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(T.nilable(Integer)) } + # If the subscription has ended, the date the subscription ended. + sig { returns(T.nilable(Integer)) } attr_reader :ended_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings + sig { returns(InvoiceSettings) } attr_reader :invoice_settings - sig { returns(Stripe::ListObject) } + # List of subscription items, each with an attached price. + sig { returns(Stripe::ListObject) } attr_reader :items - sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription. + sig { returns(T.nilable(LastPriceMigrationError)) } attr_reader :last_price_migration_error - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The most recent invoice this subscription has generated. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :latest_invoice - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(Integer)) } + # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + sig { returns(T.nilable(Integer)) } attr_reader :next_pending_invoice_item_invoice - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(PauseCollection)) } + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection - sig { returns(T.nilable(PaymentSettings)) } + # Payment settings passed on to invoices created by the subscription. + sig { returns(T.nilable(PaymentSettings)) } attr_reader :payment_settings - sig { returns(T.nilable(PendingInvoiceItemInterval)) } + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + sig { returns(T.nilable(PendingInvoiceItemInterval)) } attr_reader :pending_invoice_item_interval - sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } + # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } attr_reader :pending_setup_intent - sig { returns(T.nilable(PendingUpdate)) } + # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + sig { returns(T.nilable(PendingUpdate)) } attr_reader :pending_update - sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. + sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } + # The schedule attached to the subscription + sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } attr_reader :schedule - sig { returns(Integer) } + # Date when the subscription was first created. The date might differ from the `created` date due to backdating. + sig { returns(Integer) } attr_reader :start_date - sig { returns(String) } + # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. # # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. @@ -356,21 +471,27 @@ module Stripe # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). # # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T.nilable(TransferData)) } + # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(Integer)) } + # If the subscription has a trial, the end of that trial. + sig { returns(T.nilable(Integer)) } attr_reader :trial_end - sig { returns(T.nilable(TrialSettings)) } + # Settings related to subscription trials. + sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings - sig { returns(T.nilable(Integer)) } + # If the subscription has a trial, the beginning of that trial. + sig { returns(T.nilable(Integer)) } attr_reader :trial_start end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_item.rbi b/rbi/stripe/resources/subscription_item.rbi index ac87a5823..b03485b30 100644 --- a/rbi/stripe/resources/subscription_item.rbi +++ b/rbi/stripe/resources/subscription_item.rbi @@ -7,34 +7,42 @@ module Stripe # one plan, making it easy to represent complex billing relationships. class SubscriptionItem < APIResource class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(BillingThresholds)) } # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::Plan) } + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. # # Plans define the base price, currency, and billing cycle for recurring purchases of products. @@ -43,29 +51,36 @@ module Stripe # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + sig { returns(Stripe::Plan) } attr_reader :plan - sig { returns(Stripe::Price) } + # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. # # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + sig { returns(Stripe::Price) } attr_reader :price - sig { returns(Integer) } + # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + sig { returns(Integer) } attr_reader :quantity - sig { returns(String) } + # The `subscription` this `subscription_item` belongs to. + sig { returns(String) } attr_reader :subscription - sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - sig { returns(T.nilable(Trial)) } + # Options that configure the trial on the subscription item. + sig { returns(T.nilable(Trial)) } attr_reader :trial - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index 808dc724f..eda81647a 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -8,82 +8,112 @@ module Stripe # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) class SubscriptionSchedule < APIResource class CurrentPhase < Stripe::StripeObject + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(String) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject + # The original price to be migrated. sig { returns(String) } attr_reader :source_price + # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end + # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at + # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions + # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end @@ -91,260 +121,357 @@ module Stripe class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end + # The stackable discounts that will be applied to the item. sig { returns(T::Array[Discount]) } attr_reader :discounts + # ID of the price used to generate the invoice item. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # The quantity of the invoice item. sig { returns(T.nilable(Integer)) } attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the plan to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Plan)) } attr_reader :plan + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. sig { returns(T::Array[AddInvoiceItem]) } attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The invoice settings applicable during this phase. sig { returns(T.nilable(InvoiceSettings)) } attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. sig { returns(T::Array[Item]) } attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. sig { returns(String) } attr_reader :proration_behavior + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries sig { returns(T.nilable(String)) } attr_reader :trial_continuation + # When the trial ends within the phase. sig { returns(T.nilable(Integer)) } attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class Prebilling < Stripe::StripeObject + # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end + # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the schedule. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(String) } + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } attr_reader :billing_behavior - sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. - attr_reader :canceled_at sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :completed_at - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CurrentPhase)) } + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + sig { returns(T.nilable(CurrentPhase)) } attr_reader :current_phase - sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription schedule. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(DefaultSettings) } + # Attribute for field default_settings + sig { returns(DefaultSettings) } attr_reader :default_settings - sig { returns(String) } + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - attr_reader :end_behavior sig { returns(String) } + attr_reader :end_behavior + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription schedule. + sig { returns(T.nilable(LastPriceMigrationError)) } attr_reader :last_price_migration_error - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Phase]) } + # Configuration for the subscription schedule's phases. + sig { returns(T::Array[Phase]) } attr_reader :phases - sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. + sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :released_at - sig { returns(T.nilable(String)) } + # ID of the subscription once managed by the subscription schedule (if it is released). + sig { returns(T.nilable(String)) } attr_reader :released_subscription - sig { returns(String) } + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # ID of the subscription managed by the subscription schedule. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription schedule belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/association.rbi b/rbi/stripe/resources/tax/association.rbi index eed008d08..2ce5aa4ce 100644 --- a/rbi/stripe/resources/tax/association.rbi +++ b/rbi/stripe/resources/tax/association.rbi @@ -11,56 +11,73 @@ module Stripe class Reversal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject class Committed < Stripe::StripeObject + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) sig { returns(String) } attr_reader :transaction end class Errored < Stripe::StripeObject + # Details on why we could not commit the reversal Tax Transaction sig { returns(String) } attr_reader :reason + # The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal. sig { returns(String) } attr_reader :refund_id end + # Attribute for field committed sig { returns(Committed) } attr_reader :committed + # Attribute for field errored sig { returns(Errored) } attr_reader :errored end + # Status of the attempted Tax Transaction reversal. sig { returns(String) } attr_reader :status + # Attribute for field status_details sig { returns(StatusDetails) } attr_reader :status_details end + # Attempts to create Tax Transaction reversals sig { returns(T::Array[Reversal]) } attr_reader :reversals + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) sig { returns(String) } attr_reader :transaction end class Errored < Stripe::StripeObject + # Details on why we could not commit the Tax Transaction sig { returns(String) } attr_reader :reason end + # Attribute for field committed sig { returns(Committed) } attr_reader :committed + # Attribute for field errored sig { returns(Errored) } attr_reader :errored end - sig { returns(String) } # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. - attr_reader :calculation sig { returns(String) } + attr_reader :calculation + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. - attr_reader :payment_intent sig { returns(String) } + attr_reader :payment_intent + # Status of the Tax Association. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } + # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details end end diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi index 04b5f4d2c..1a067f224 100644 --- a/rbi/stripe/resources/tax/calculation.rbi +++ b/rbi/stripe/resources/tax/calculation.rbi @@ -10,176 +10,242 @@ module Stripe class Calculation < APIResource class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(String) } attr_reader :value end + # The customer's postal address (for example, home or business location). sig { returns(T.nilable(Address)) } attr_reader :address + # The type of customer address provided. sig { returns(T.nilable(String)) } attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). sig { returns(T::Array[TaxId]) } attr_reader :tax_ids + # The taxability override used for taxation. sig { returns(String) } attr_reader :taxability_override end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). sig { returns(String) } attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. sig { returns(String) } attr_reader :tax_code end class TaxBreakdown < Stripe::StripeObject class TaxRateDetails < Stripe::StripeObject class FlatAmount < Stripe::StripeObject + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount + # Three-letter ISO currency code, in lowercase. sig { returns(String) } attr_reader :currency end + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. sig { returns(T.nilable(FlatAmount)) } attr_reader :flat_amount + # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. sig { returns(String) } attr_reader :percentage_decimal + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. sig { returns(T.nilable(String)) } attr_reader :rate_type + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state + # The tax type, such as `vat` or `sales_tax`. sig { returns(T.nilable(String)) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Specifies whether the tax amount is included in the line item amount. sig { returns(T::Boolean) } attr_reader :inclusive + # Attribute for field tax_rate_details sig { returns(TaxRateDetails) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - sig { returns(Integer) } # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount_total - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + sig { returns(T.nilable(String)) } attr_reader :customer - sig { returns(CustomerDetails) } + # Attribute for field customer_details + sig { returns(CustomerDetails) } attr_reader :customer_details - sig { returns(T.nilable(Integer)) } + # Timestamp of date at which the tax calculation will expire. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(T.nilable(String)) } + # Unique identifier for the calculation. + sig { returns(T.nilable(String)) } attr_reader :id - sig { returns(T.nilable(Stripe::ListObject)) } + # The list of items the customer is purchasing. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :line_items - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ShipFromDetails)) } + # The details of the ship from location, such as the address. + sig { returns(T.nilable(ShipFromDetails)) } attr_reader :ship_from_details - sig { returns(T.nilable(ShippingCost)) } + # The shipping cost details for the calculation. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(Integer) } + # The amount of tax to be collected on top of the line item prices. - attr_reader :tax_amount_exclusive sig { returns(Integer) } + attr_reader :tax_amount_exclusive + # The amount of tax already included in the line item prices. + sig { returns(Integer) } attr_reader :tax_amount_inclusive - sig { returns(T::Array[TaxBreakdown]) } + # Breakdown of individual tax amounts that add up to the total. + sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown - sig { returns(Integer) } + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + sig { returns(Integer) } attr_reader :tax_date end end diff --git a/rbi/stripe/resources/tax/calculation_line_item.rbi b/rbi/stripe/resources/tax/calculation_line_item.rbi index 7503a62bd..571ebbf63 100644 --- a/rbi/stripe/resources/tax/calculation_line_item.rbi +++ b/rbi/stripe/resources/tax/calculation_line_item.rbi @@ -7,68 +7,91 @@ module Stripe class CalculationLineItem < APIResource class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - sig { returns(Integer) } # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount_tax - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + sig { returns(T.nilable(String)) } attr_reader :product - sig { returns(Integer) } + # The number of units of the item being purchased. For reversals, this is the quantity reversed. + sig { returns(Integer) } attr_reader :quantity - sig { returns(T.nilable(String)) } + # A custom identifier for this line item. + sig { returns(T.nilable(String)) } attr_reader :reference - sig { returns(String) } + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + sig { returns(String) } attr_reader :tax_behavior - sig { returns(T.nilable(T::Array[TaxBreakdown])) } + # Detailed account of taxes relevant to this line item. + sig { returns(T.nilable(T::Array[TaxBreakdown])) } attr_reader :tax_breakdown - sig { returns(String) } + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + sig { returns(String) } attr_reader :tax_code end end diff --git a/rbi/stripe/resources/tax/form.rbi b/rbi/stripe/resources/tax/form.rbi index 50eb235f4..f403f3b29 100644 --- a/rbi/stripe/resources/tax/form.rbi +++ b/rbi/stripe/resources/tax/form.rbi @@ -9,118 +9,155 @@ module Stripe # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting) class Form < APIResource class AuSerr < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class CaMrdp < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class EuDac7 < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class FilingStatus < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`. sig { returns(String) } attr_reader :country + # Indicates the level of the jurisdiction where the form was filed. sig { returns(String) } attr_reader :level + # [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end + # Time when the filing status was updated. sig { returns(Integer) } attr_reader :effective_at + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # The current status of the filed form. sig { returns(String) } attr_reader :value end class GbMrdp < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class NzMrdp < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class Payee < Stripe::StripeObject + # The ID of the payee's Stripe account. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account + # The external reference to this payee. sig { returns(T.nilable(String)) } attr_reader :external_reference + # Either `account` or `external_reference`. sig { returns(String) } attr_reader :type end class Us1099K < Stripe::StripeObject + # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end class Us1099Misc < Stripe::StripeObject + # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end class Us1099Nec < Stripe::StripeObject + # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end - sig { returns(AuSerr) } # Attribute for field au_serr + sig { returns(AuSerr) } attr_reader :au_serr - sig { returns(CaMrdp) } + # Attribute for field ca_mrdp + sig { returns(CaMrdp) } attr_reader :ca_mrdp - sig { returns(T.nilable(T.any(String, Stripe::Tax::Form))) } + # The form that corrects this form, if any. + sig { returns(T.nilable(T.any(String, Stripe::Tax::Form))) } attr_reader :corrected_by - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(EuDac7) } + # Attribute for field eu_dac7 + sig { returns(EuDac7) } attr_reader :eu_dac7 - sig { returns(T::Array[FilingStatus]) } + # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. + sig { returns(T::Array[FilingStatus]) } attr_reader :filing_statuses - sig { returns(GbMrdp) } + # Attribute for field gb_mrdp + sig { returns(GbMrdp) } attr_reader :gb_mrdp - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(NzMrdp) } + # Attribute for field nz_mrdp + sig { returns(NzMrdp) } attr_reader :nz_mrdp - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Payee) } + # Attribute for field payee + sig { returns(Payee) } attr_reader :payee - sig { returns(String) } + # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. + sig { returns(String) } attr_reader :type - sig { returns(Us1099K) } + # Attribute for field us_1099_k + sig { returns(Us1099K) } attr_reader :us_1099_k - sig { returns(Us1099Misc) } + # Attribute for field us_1099_misc + sig { returns(Us1099Misc) } attr_reader :us_1099_misc - sig { returns(Us1099Nec) } + # Attribute for field us_1099_nec + sig { returns(Us1099Nec) } attr_reader :us_1099_nec end end diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi index 71290cf95..89587ba9d 100644 --- a/rbi/stripe/resources/tax/registration.rbi +++ b/rbi/stripe/resources/tax/registration.rbi @@ -12,616 +12,819 @@ module Stripe class Registration < APIResource class CountryOptions < Stripe::StripeObject class Ae < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class At < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Au < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Be < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Bg < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Bh < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class By < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ca < Stripe::StripeObject class ProvinceStandard < Stripe::StripeObject + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). sig { returns(String) } attr_reader :province end + # Attribute for field province_standard sig { returns(ProvinceStandard) } attr_reader :province_standard + # Type of registration in Canada. sig { returns(String) } attr_reader :type end class Ch < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cl < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Co < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cr < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cy < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Cz < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class De < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Dk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ec < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ee < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Eg < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Es < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Fi < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Fr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Gb < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ge < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Gr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Hr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Hu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Id < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ie < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Is < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class It < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Jp < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ke < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Kr < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Kz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Lt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Lu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Lv < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ma < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Md < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Mt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Mx < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class My < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ng < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Nl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class No < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Nz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Om < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Pl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Pt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ro < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Rs < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ru < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Sa < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Se < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Sg < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Si < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Sk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Th < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Tr < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Tz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Us < Stripe::StripeObject class LocalAmusementTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction end class LocalLeaseTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction end class StateSalesTax < Stripe::StripeObject class Election < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction + # The type of the election for the state sales tax registration. sig { returns(String) } attr_reader :type end + # Elections for the state sales tax registration. sig { returns(T::Array[Election]) } attr_reader :elections end + # Attribute for field local_amusement_tax sig { returns(LocalAmusementTax) } attr_reader :local_amusement_tax + # Attribute for field local_lease_tax sig { returns(LocalLeaseTax) } attr_reader :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). sig { returns(String) } attr_reader :state + # Attribute for field state_sales_tax sig { returns(StateSalesTax) } attr_reader :state_sales_tax + # Type of registration in the US. sig { returns(String) } attr_reader :type end class Uz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Vn < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Za < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end + # Attribute for field ae sig { returns(Ae) } attr_reader :ae + # Attribute for field at sig { returns(At) } attr_reader :at + # Attribute for field au sig { returns(Au) } attr_reader :au + # Attribute for field be sig { returns(Be) } attr_reader :be + # Attribute for field bg sig { returns(Bg) } attr_reader :bg + # Attribute for field bh sig { returns(Bh) } attr_reader :bh + # Attribute for field by sig { returns(By) } attr_reader :by + # Attribute for field ca sig { returns(Ca) } attr_reader :ca + # Attribute for field ch sig { returns(Ch) } attr_reader :ch + # Attribute for field cl sig { returns(Cl) } attr_reader :cl + # Attribute for field co sig { returns(Co) } attr_reader :co + # Attribute for field cr sig { returns(Cr) } attr_reader :cr + # Attribute for field cy sig { returns(Cy) } attr_reader :cy + # Attribute for field cz sig { returns(Cz) } attr_reader :cz + # Attribute for field de sig { returns(De) } attr_reader :de + # Attribute for field dk sig { returns(Dk) } attr_reader :dk + # Attribute for field ec sig { returns(Ec) } attr_reader :ec + # Attribute for field ee sig { returns(Ee) } attr_reader :ee + # Attribute for field eg sig { returns(Eg) } attr_reader :eg + # Attribute for field es sig { returns(Es) } attr_reader :es + # Attribute for field fi sig { returns(Fi) } attr_reader :fi + # Attribute for field fr sig { returns(Fr) } attr_reader :fr + # Attribute for field gb sig { returns(Gb) } attr_reader :gb + # Attribute for field ge sig { returns(Ge) } attr_reader :ge + # Attribute for field gr sig { returns(Gr) } attr_reader :gr + # Attribute for field hr sig { returns(Hr) } attr_reader :hr + # Attribute for field hu sig { returns(Hu) } attr_reader :hu + # Attribute for field id sig { returns(Id) } attr_reader :id + # Attribute for field ie sig { returns(Ie) } attr_reader :ie + # Attribute for field is sig { returns(Is) } attr_reader :is + # Attribute for field it sig { returns(It) } attr_reader :it + # Attribute for field jp sig { returns(Jp) } attr_reader :jp + # Attribute for field ke sig { returns(Ke) } attr_reader :ke + # Attribute for field kr sig { returns(Kr) } attr_reader :kr + # Attribute for field kz sig { returns(Kz) } attr_reader :kz + # Attribute for field lt sig { returns(Lt) } attr_reader :lt + # Attribute for field lu sig { returns(Lu) } attr_reader :lu + # Attribute for field lv sig { returns(Lv) } attr_reader :lv + # Attribute for field ma sig { returns(Ma) } attr_reader :ma + # Attribute for field md sig { returns(Md) } attr_reader :md + # Attribute for field mt sig { returns(Mt) } attr_reader :mt + # Attribute for field mx sig { returns(Mx) } attr_reader :mx + # Attribute for field my sig { returns(My) } attr_reader :my + # Attribute for field ng sig { returns(Ng) } attr_reader :ng + # Attribute for field nl sig { returns(Nl) } attr_reader :nl + # Attribute for field no sig { returns(No) } attr_reader :no + # Attribute for field nz sig { returns(Nz) } attr_reader :nz + # Attribute for field om sig { returns(Om) } attr_reader :om + # Attribute for field pl sig { returns(Pl) } attr_reader :pl + # Attribute for field pt sig { returns(Pt) } attr_reader :pt + # Attribute for field ro sig { returns(Ro) } attr_reader :ro + # Attribute for field rs sig { returns(Rs) } attr_reader :rs + # Attribute for field ru sig { returns(Ru) } attr_reader :ru + # Attribute for field sa sig { returns(Sa) } attr_reader :sa + # Attribute for field se sig { returns(Se) } attr_reader :se + # Attribute for field sg sig { returns(Sg) } attr_reader :sg + # Attribute for field si sig { returns(Si) } attr_reader :si + # Attribute for field sk sig { returns(Sk) } attr_reader :sk + # Attribute for field th sig { returns(Th) } attr_reader :th + # Attribute for field tr sig { returns(Tr) } attr_reader :tr + # Attribute for field tz sig { returns(Tz) } attr_reader :tz + # Attribute for field us sig { returns(Us) } attr_reader :us + # Attribute for field uz sig { returns(Uz) } attr_reader :uz + # Attribute for field vn sig { returns(Vn) } attr_reader :vn + # Attribute for field za sig { returns(Za) } attr_reader :za end - sig { returns(Integer) } # Time at which the registration becomes active. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :active_from - sig { returns(String) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } attr_reader :country - sig { returns(CountryOptions) } + # Attribute for field country_options + sig { returns(CountryOptions) } attr_reader :country_options - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + sig { returns(String) } attr_reader :status end end diff --git a/rbi/stripe/resources/tax/settings.rbi b/rbi/stripe/resources/tax/settings.rbi index 33751bfb4..1c1ba5c93 100644 --- a/rbi/stripe/resources/tax/settings.rbi +++ b/rbi/stripe/resources/tax/settings.rbi @@ -9,57 +9,74 @@ module Stripe # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) class Settings < SingletonAPIResource class Defaults < Stripe::StripeObject + # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. sig { returns(T.nilable(String)) } attr_reader :tax_behavior + # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. sig { returns(T.nilable(String)) } attr_reader :tax_code end class HeadOffice < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class StatusDetails < Stripe::StripeObject class Active < Stripe::StripeObject; end class Pending < Stripe::StripeObject + # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. sig { returns(T.nilable(T::Array[String])) } attr_reader :missing_fields end + # Attribute for field active sig { returns(Active) } attr_reader :active + # Attribute for field pending sig { returns(Pending) } attr_reader :pending end - sig { returns(Defaults) } # Attribute for field defaults + sig { returns(Defaults) } attr_reader :defaults - sig { returns(T.nilable(HeadOffice)) } + # The place where your business is located. + sig { returns(T.nilable(HeadOffice)) } attr_reader :head_office - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The status of the Tax `Settings`. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } + # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details end end diff --git a/rbi/stripe/resources/tax/transaction.rbi b/rbi/stripe/resources/tax/transaction.rbi index 1000305d7..8740d9f58 100644 --- a/rbi/stripe/resources/tax/transaction.rbi +++ b/rbi/stripe/resources/tax/transaction.rbi @@ -10,151 +10,206 @@ module Stripe class Transaction < APIResource class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(String) } attr_reader :value end + # The customer's postal address (for example, home or business location). sig { returns(T.nilable(Address)) } attr_reader :address + # The type of customer address provided. sig { returns(T.nilable(String)) } attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). sig { returns(T::Array[TaxId]) } attr_reader :tax_ids + # The taxability override used for taxation. sig { returns(String) } attr_reader :taxability_override end class Reversal < Stripe::StripeObject + # The `id` of the reversed `Transaction` object. sig { returns(T.nilable(String)) } attr_reader :original_transaction end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). sig { returns(String) } attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. sig { returns(String) } attr_reader :tax_code end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + sig { returns(T.nilable(String)) } attr_reader :customer - sig { returns(CustomerDetails) } + # Attribute for field customer_details + sig { returns(CustomerDetails) } attr_reader :customer_details - sig { returns(String) } + # Unique identifier for the transaction. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(Stripe::ListObject)) } + # The tax collected or refunded, by line item. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :line_items - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # The Unix timestamp representing when the tax liability is assumed or reduced. + sig { returns(Integer) } attr_reader :posted_at - sig { returns(String) } + # A custom unique identifier, such as 'myOrder_123'. + sig { returns(String) } attr_reader :reference - sig { returns(T.nilable(Reversal)) } + # If `type=reversal`, contains information about what was reversed. + sig { returns(T.nilable(Reversal)) } attr_reader :reversal - sig { returns(T.nilable(ShipFromDetails)) } + # The details of the ship from location, such as the address. + sig { returns(T.nilable(ShipFromDetails)) } attr_reader :ship_from_details - sig { returns(T.nilable(ShippingCost)) } + # The shipping cost details for the transaction. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(Integer) } + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + sig { returns(Integer) } attr_reader :tax_date - sig { returns(String) } + # If `reversal`, this transaction reverses an earlier transaction. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/tax/transaction_line_item.rbi b/rbi/stripe/resources/tax/transaction_line_item.rbi index 0425f2f49..2b65c9c53 100644 --- a/rbi/stripe/resources/tax/transaction_line_item.rbi +++ b/rbi/stripe/resources/tax/transaction_line_item.rbi @@ -6,47 +6,60 @@ module Stripe module Tax class TransactionLineItem < APIResource class Reversal < Stripe::StripeObject + # The `id` of the line item to reverse in the original transaction. sig { returns(String) } attr_reader :original_line_item end - sig { returns(Integer) } # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount_tax - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + sig { returns(T.nilable(String)) } attr_reader :product - sig { returns(Integer) } + # The number of units of the item being purchased. For reversals, this is the quantity reversed. + sig { returns(Integer) } attr_reader :quantity - sig { returns(String) } + # A custom identifier for this line item in the transaction. + sig { returns(String) } attr_reader :reference - sig { returns(T.nilable(Reversal)) } + # If `type=reversal`, contains information about what was reversed. + sig { returns(T.nilable(Reversal)) } attr_reader :reversal - sig { returns(String) } + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. - attr_reader :tax_behavior sig { returns(String) } + attr_reader :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. - attr_reader :tax_code sig { returns(String) } + attr_reader :tax_code + # If `reversal`, this line item reverses an earlier transaction. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/tax_code.rbi b/rbi/stripe/resources/tax_code.rbi index 61d513279..38d6b5174 100644 --- a/rbi/stripe/resources/tax_code.rbi +++ b/rbi/stripe/resources/tax_code.rbi @@ -5,17 +5,20 @@ module Stripe # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. class TaxCode < APIResource - sig { returns(String) } # A detailed description of which types of products the tax code represents. - attr_reader :description sig { returns(String) } + attr_reader :description + # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # A short name for the tax code. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_deducted_at_source.rbi b/rbi/stripe/resources/tax_deducted_at_source.rbi index 4271140df..ef2601f3c 100644 --- a/rbi/stripe/resources/tax_deducted_at_source.rbi +++ b/rbi/stripe/resources/tax_deducted_at_source.rbi @@ -4,20 +4,24 @@ # typed: true module Stripe class TaxDeductedAtSource < APIResource - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. - attr_reader :period_end sig { returns(Integer) } + attr_reader :period_end + # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + sig { returns(Integer) } attr_reader :period_start - sig { returns(String) } + # The TAN that was supplied to Stripe when TDS was assessed + sig { returns(String) } attr_reader :tax_deduction_account_number end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_id.rbi b/rbi/stripe/resources/tax_id.rbi index 9844a442f..a06192bae 100644 --- a/rbi/stripe/resources/tax_id.rbi +++ b/rbi/stripe/resources/tax_id.rbi @@ -9,55 +9,72 @@ module Stripe # Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids) class TaxId < APIResource class Owner < Stripe::StripeObject + # The account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # The Connect Application being referenced when `type` is `application`. sig { returns(T.any(String, Stripe::Application)) } attr_reader :application + # The customer being referenced when `type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer + # Type of owner referenced. sig { returns(String) } attr_reader :type end class Verification < Stripe::StripeObject + # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. sig { returns(String) } attr_reader :status + # Verified address. sig { returns(T.nilable(String)) } attr_reader :verified_address + # Verified name. sig { returns(T.nilable(String)) } attr_reader :verified_name end - sig { returns(T.nilable(String)) } # Two-letter ISO code representing the country of the tax ID. + sig { returns(T.nilable(String)) } attr_reader :country - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the customer. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Owner)) } + # The account or customer the tax ID belongs to. + sig { returns(T.nilable(Owner)) } attr_reader :owner - sig { returns(String) } + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` - attr_reader :type sig { returns(String) } + attr_reader :type + # Value of the tax ID. + sig { returns(String) } attr_reader :value - sig { returns(T.nilable(Verification)) } + # Tax ID verification information. + sig { returns(T.nilable(Verification)) } attr_reader :verification - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi index 952ef7f8d..47cbecc99 100644 --- a/rbi/stripe/resources/tax_rate.rbi +++ b/rbi/stripe/resources/tax_rate.rbi @@ -8,66 +8,85 @@ module Stripe # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) class TaxRate < APIResource class FlatAmount < Stripe::StripeObject + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount + # Three-letter ISO currency code, in lowercase. sig { returns(String) } attr_reader :currency end - sig { returns(T::Boolean) } # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(T.nilable(String)) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } attr_reader :country - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } + # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + sig { returns(String) } attr_reader :display_name - sig { returns(T.nilable(Float)) } + # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, # this percentage reflects the rate actually used to calculate tax based on the product's taxability # and whether the user is registered to collect taxes in the corresponding jurisdiction. + sig { returns(T.nilable(Float)) } attr_reader :effective_percentage - sig { returns(T.nilable(FlatAmount)) } + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + sig { returns(T.nilable(FlatAmount)) } attr_reader :flat_amount - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } attr_reader :inclusive - sig { returns(T.nilable(String)) } + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. - attr_reader :jurisdiction sig { returns(T.nilable(String)) } + attr_reader :jurisdiction + # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + sig { returns(T.nilable(String)) } attr_reader :jurisdiction_level - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Float) } + # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + sig { returns(Float) } attr_reader :percentage - sig { returns(T.nilable(String)) } + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. - attr_reader :rate_type sig { returns(T.nilable(String)) } + attr_reader :rate_type + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - attr_reader :state sig { returns(T.nilable(String)) } + attr_reader :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(T.nilable(String)) } attr_reader :tax_type end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi index c1fe96bfc..a3e7e7eb3 100644 --- a/rbi/stripe/resources/terminal/configuration.rbi +++ b/rbi/stripe/resources/terminal/configuration.rbi @@ -7,214 +7,291 @@ module Stripe # A Configurations object represents how features should be configured for terminal readers. class Configuration < APIResource class BbposWiseposE < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end class Offline < Stripe::StripeObject + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end class RebootWindow < Stripe::StripeObject + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. sig { returns(Integer) } attr_reader :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. sig { returns(Integer) } attr_reader :start_hour end class StripeS700 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end class Tipping < Stripe::StripeObject class Aud < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Cad < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Chf < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Czk < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Dkk < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Eur < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Gbp < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Hkd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Myr < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Nok < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Nzd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Pln < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Sek < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Sgd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Usd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end + # Attribute for field aud sig { returns(Aud) } attr_reader :aud + # Attribute for field cad sig { returns(Cad) } attr_reader :cad + # Attribute for field chf sig { returns(Chf) } attr_reader :chf + # Attribute for field czk sig { returns(Czk) } attr_reader :czk + # Attribute for field dkk sig { returns(Dkk) } attr_reader :dkk + # Attribute for field eur sig { returns(Eur) } attr_reader :eur + # Attribute for field gbp sig { returns(Gbp) } attr_reader :gbp + # Attribute for field hkd sig { returns(Hkd) } attr_reader :hkd + # Attribute for field myr sig { returns(Myr) } attr_reader :myr + # Attribute for field nok sig { returns(Nok) } attr_reader :nok + # Attribute for field nzd sig { returns(Nzd) } attr_reader :nzd + # Attribute for field pln sig { returns(Pln) } attr_reader :pln + # Attribute for field sek sig { returns(Sek) } attr_reader :sek + # Attribute for field sgd sig { returns(Sgd) } attr_reader :sgd + # Attribute for field usd sig { returns(Usd) } attr_reader :usd end class VerifoneP400 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end - sig { returns(BbposWiseposE) } # Attribute for field bbpos_wisepos_e + sig { returns(BbposWiseposE) } attr_reader :bbpos_wisepos_e - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Boolean)) } + # Whether this Configuration is the default for your account + sig { returns(T.nilable(T::Boolean)) } attr_reader :is_account_default - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # String indicating the name of the Configuration object, set by the user + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Offline) } + # Attribute for field offline + sig { returns(Offline) } attr_reader :offline - sig { returns(RebootWindow) } + # Attribute for field reboot_window + sig { returns(RebootWindow) } attr_reader :reboot_window - sig { returns(StripeS700) } + # Attribute for field stripe_s700 + sig { returns(StripeS700) } attr_reader :stripe_s700 - sig { returns(Tipping) } + # Attribute for field tipping + sig { returns(Tipping) } attr_reader :tipping - sig { returns(VerifoneP400) } + # Attribute for field verifone_p400 + sig { returns(VerifoneP400) } attr_reader :verifone_p400 - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end diff --git a/rbi/stripe/resources/terminal/connection_token.rbi b/rbi/stripe/resources/terminal/connection_token.rbi index a22e7d28e..c6cb936bf 100644 --- a/rbi/stripe/resources/terminal/connection_token.rbi +++ b/rbi/stripe/resources/terminal/connection_token.rbi @@ -8,14 +8,16 @@ module Stripe # # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) class ConnectionToken < APIResource - sig { returns(String) } # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). - attr_reader :location sig { returns(String) } + attr_reader :location + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Your application should pass this token to the Stripe Terminal SDK. + sig { returns(String) } attr_reader :secret end end diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi index eea6a8ce6..6600b4059 100644 --- a/rbi/stripe/resources/terminal/location.rbi +++ b/rbi/stripe/resources/terminal/location.rbi @@ -9,42 +9,55 @@ module Stripe # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) class Location < APIResource class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - sig { returns(Address) } # Attribute for field address + sig { returns(Address) } attr_reader :address - sig { returns(String) } + # The ID of a configuration that will be used to customize all readers in this location. - attr_reader :configuration_overrides sig { returns(String) } + attr_reader :configuration_overrides + # The display name of the location. - attr_reader :display_name sig { returns(String) } + attr_reader :display_name + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index d6d31698e..7a6067202 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -12,256 +12,354 @@ module Stripe class CollectInputs < Stripe::StripeObject class Input < Stripe::StripeObject class CustomText < Stripe::StripeObject + # Customize the default description for this input sig { returns(T.nilable(String)) } attr_reader :description + # Customize the default label for this input's skip button sig { returns(T.nilable(String)) } attr_reader :skip_button + # Customize the default label for this input's submit button sig { returns(T.nilable(String)) } attr_reader :submit_button + # Customize the default title for this input sig { returns(T.nilable(String)) } attr_reader :title end class Email < Stripe::StripeObject + # The collected email address sig { returns(T.nilable(String)) } attr_reader :value end class Numeric < Stripe::StripeObject + # The collected number sig { returns(T.nilable(String)) } attr_reader :value end class Phone < Stripe::StripeObject + # The collected phone number sig { returns(T.nilable(String)) } attr_reader :value end class Selection < Stripe::StripeObject class Choice < Stripe::StripeObject + # The button style for the choice sig { returns(T.nilable(String)) } attr_reader :style + # A value to be selected sig { returns(String) } attr_reader :value end + # List of possible choices to be selected sig { returns(T::Array[Choice]) } attr_reader :choices + # The value of the selected choice sig { returns(T.nilable(String)) } attr_reader :value end class Signature < Stripe::StripeObject + # The File ID of a collected signature image sig { returns(T.nilable(String)) } attr_reader :value end class Text < Stripe::StripeObject + # The collected text value sig { returns(T.nilable(String)) } attr_reader :value end class Toggle < Stripe::StripeObject + # The toggle's default value sig { returns(T.nilable(String)) } attr_reader :default_value + # The toggle's description text sig { returns(T.nilable(String)) } attr_reader :description + # The toggle's title text sig { returns(T.nilable(String)) } attr_reader :title + # The toggle's collected value sig { returns(T.nilable(String)) } attr_reader :value end + # Default text of input being collected. sig { returns(T.nilable(CustomText)) } attr_reader :custom_text + # Information about a email being collected using a reader sig { returns(Email) } attr_reader :email + # Information about a number being collected using a reader sig { returns(Numeric) } attr_reader :numeric + # Information about a phone number being collected using a reader sig { returns(Phone) } attr_reader :phone + # Indicate that this input is required, disabling the skip button. sig { returns(T.nilable(T::Boolean)) } attr_reader :required + # Information about a selection being collected using a reader sig { returns(Selection) } attr_reader :selection + # Information about a signature being collected using a reader sig { returns(Signature) } attr_reader :signature + # Indicate that this input was skipped by the user. sig { returns(T::Boolean) } attr_reader :skipped + # Information about text being collected using a reader sig { returns(Text) } attr_reader :text + # List of toggles being collected. Values are present if collection is complete. sig { returns(T.nilable(T::Array[Toggle])) } attr_reader :toggles + # Type of input being collected. sig { returns(String) } attr_reader :type end + # List of inputs to be collected. sig { returns(T::Array[Input]) } attr_reader :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata end class CollectPaymentMethod < Stripe::StripeObject class CollectConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :amount_eligible end + # Enable customer initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. sig { returns(T::Boolean) } attr_reader :skip_tipping + # Represents a per-transaction tipping configuration sig { returns(Tipping) } attr_reader :tipping end + # Represents a per-transaction override of a reader configuration sig { returns(CollectConfig) } attr_reader :collect_config + # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class ConfirmPaymentIntent < Stripe::StripeObject + # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :amount_eligible end + # Enable customer initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. sig { returns(T::Boolean) } attr_reader :skip_tipping + # Represents a per-transaction tipping configuration sig { returns(Tipping) } attr_reader :tipping end + # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # Represents a per-transaction override of a reader configuration sig { returns(ProcessConfig) } attr_reader :process_config + # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject + # Enable customer initiated cancellation when processing this SetupIntent. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(String) } attr_reader :generated_card + # Represents a per-setup override of a reader configuration sig { returns(ProcessConfig) } attr_reader :process_config + # Most recent SetupIntent processed by the reader. sig { returns(T.any(String, Stripe::SetupIntent)) } attr_reader :setup_intent end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject + # Enable customer initiated cancellation when refunding this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end + # The amount being refunded. sig { returns(Integer) } attr_reader :amount + # Charge that is being refunded. sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # Payment intent that is being refunded. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # The reason for the refund. sig { returns(String) } attr_reader :reason + # Unique identifier for the refund object. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. sig { returns(T::Boolean) } attr_reader :refund_application_fee + # Represents a per-transaction override of a reader configuration sig { returns(RefundPaymentConfig) } attr_reader :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. sig { returns(T::Boolean) } attr_reader :reverse_transfer + # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class SetReaderDisplay < Stripe::StripeObject class Cart < Stripe::StripeObject class LineItem < Stripe::StripeObject + # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Description of the line item. sig { returns(String) } attr_reader :description + # The quantity of the line item. sig { returns(Integer) } attr_reader :quantity end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # List of line items in the cart. sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } attr_reader :tax + # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :total end + # Cart object to be displayed by the reader. sig { returns(T.nilable(Cart)) } attr_reader :cart + # Type of information to be displayed by the reader. sig { returns(String) } attr_reader :type end + # Represents a reader action to collect customer inputs sig { returns(CollectInputs) } attr_reader :collect_inputs + # Represents a reader action to collect a payment method sig { returns(CollectPaymentMethod) } attr_reader :collect_payment_method + # Represents a reader action to confirm a payment sig { returns(ConfirmPaymentIntent) } attr_reader :confirm_payment_intent + # Failure code, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_code + # Detailed failure message, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_message + # Represents a reader action to process a payment intent sig { returns(ProcessPaymentIntent) } attr_reader :process_payment_intent + # Represents a reader action to process a setup intent sig { returns(ProcessSetupIntent) } attr_reader :process_setup_intent + # Represents a reader action to refund a payment sig { returns(RefundPayment) } attr_reader :refund_payment + # Represents a reader action to set the reader display sig { returns(SetReaderDisplay) } attr_reader :set_reader_display + # Status of the action performed by the reader. sig { returns(String) } attr_reader :status + # Type of action performed by the reader. sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(Action)) } # The most recent action performed by the reader. + sig { returns(T.nilable(Action)) } attr_reader :action - sig { returns(T.nilable(String)) } + # The current software version of the reader. + sig { returns(T.nilable(String)) } attr_reader :device_sw_version - sig { returns(String) } + # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. - attr_reader :device_type sig { returns(String) } + attr_reader :device_type + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The local IP address of the reader. + sig { returns(T.nilable(String)) } attr_reader :ip_address - sig { returns(String) } + # Custom label given to the reader for easier identification. + sig { returns(String) } attr_reader :label - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) } + # The location identifier of the reader. + sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) } attr_reader :location - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Serial number of the reader. + sig { returns(String) } attr_reader :serial_number - sig { returns(T.nilable(String)) } + # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end diff --git a/rbi/stripe/resources/terminal/reader_collected_data.rbi b/rbi/stripe/resources/terminal/reader_collected_data.rbi index fe0db0af9..fed8d0de3 100644 --- a/rbi/stripe/resources/terminal/reader_collected_data.rbi +++ b/rbi/stripe/resources/terminal/reader_collected_data.rbi @@ -7,26 +7,32 @@ module Stripe # Returns data collected by Terminal readers. This data is only stored for 24 hours. class ReaderCollectedData < APIResource class Magstripe < Stripe::StripeObject + # The raw magstripe data collected by the reader. sig { returns(T.nilable(String)) } attr_reader :data end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(Magstripe)) } + # The magstripe data collected by the reader. + sig { returns(T.nilable(Magstripe)) } attr_reader :magstripe - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The type of data collected by the reader. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/test_helpers/test_clock.rbi b/rbi/stripe/resources/test_helpers/test_clock.rbi index 8beba43e9..0d33ce0cf 100644 --- a/rbi/stripe/resources/test_helpers/test_clock.rbi +++ b/rbi/stripe/resources/test_helpers/test_clock.rbi @@ -10,41 +10,52 @@ module Stripe class TestClock < APIResource class StatusDetails < Stripe::StripeObject class Advancing < Stripe::StripeObject + # The `frozen_time` that the Test Clock is advancing towards. sig { returns(Integer) } attr_reader :target_frozen_time end + # Attribute for field advancing sig { returns(Advancing) } attr_reader :advancing end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created + # Time at which this clock is scheduled to auto delete. - attr_reader :deletes_after sig { returns(Integer) } + attr_reader :deletes_after + # Time at which all objects belonging to this clock are frozen. + sig { returns(Integer) } attr_reader :frozen_time - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } + # The custom name supplied at creation. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The status of the Test Clock. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } + # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi index 0c81fe46e..837f55af7 100644 --- a/rbi/stripe/resources/token.rbi +++ b/rbi/stripe/resources/token.rbi @@ -24,7 +24,6 @@ module Stripe # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, # performs best with integrations that use client-side tokenization. class Token < APIResource - sig { returns(Stripe::BankAccount) } # These bank accounts are payment methods on `Customer` objects. # # On the other hand [External Accounts](/api#external_accounts) are transfer @@ -32,34 +31,43 @@ module Stripe # They can be bank accounts or debit cards as well, and are documented in the links above. # # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + sig { returns(Stripe::BankAccount) } attr_reader :bank_account - sig { returns(Stripe::Card) } + # You can store multiple cards on a customer in order to charge the customer # later. You can also store multiple debit cards on a recipient in order to # transfer to those cards later. # # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + sig { returns(Stripe::Card) } attr_reader :card - sig { returns(T.nilable(String)) } + # IP address of the client that generates the token. + sig { returns(T.nilable(String)) } attr_reader :client_ip - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Type of the token: `account`, `bank_account`, `card`, or `pii`. + sig { returns(String) } attr_reader :type - sig { returns(T::Boolean) } + # Determines if you have already used this token (you can only use tokens once). + sig { returns(T::Boolean) } attr_reader :used end end \ No newline at end of file diff --git a/rbi/stripe/resources/topup.rbi b/rbi/stripe/resources/topup.rbi index 98c75e6ea..1b2a2b76f 100644 --- a/rbi/stripe/resources/topup.rbi +++ b/rbi/stripe/resources/topup.rbi @@ -9,53 +9,68 @@ module Stripe # # Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) class Topup < APIResource - sig { returns(Integer) } # Amount transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Integer)) } + # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + sig { returns(T.nilable(Integer)) } attr_reader :expected_availability_date - sig { returns(T.nilable(String)) } + # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code + # Message to user further explaining reason for top-up failure if available. + sig { returns(T.nilable(String)) } attr_reader :failure_message - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Stripe::Source)) } + # The source field is deprecated. It might not always be present in the API response. + sig { returns(T.nilable(Stripe::Source)) } attr_reader :source - sig { returns(T.nilable(String)) } + # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(String) } + # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(String)) } + # A string that identifies this top-up as part of a group. + sig { returns(T.nilable(String)) } attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/transfer.rbi b/rbi/stripe/resources/transfer.rbi index 40b84eadf..6f8b53315 100644 --- a/rbi/stripe/resources/transfer.rbi +++ b/rbi/stripe/resources/transfer.rbi @@ -14,56 +14,72 @@ module Stripe # # Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) class Transfer < APIResource - sig { returns(Integer) } # Amount in cents (or local equivalent) to be transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + sig { returns(Integer) } attr_reader :amount_reversed - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact of this transfer on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } + # Time that this record of the transfer was first created. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # ID of the Stripe account the transfer was sent to. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :destination - sig { returns(T.any(String, Stripe::Charge)) } + # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :destination_payment - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::ListObject) } + # A list of reversals that have been applied to the transfer. + sig { returns(Stripe::ListObject) } attr_reader :reversals - sig { returns(T::Boolean) } + # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + sig { returns(T::Boolean) } attr_reader :reversed - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :source_transaction - sig { returns(String) } + # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + sig { returns(String) } attr_reader :source_type - sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(T.nilable(String)) } attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/credit_reversal.rbi b/rbi/stripe/resources/treasury/credit_reversal.rbi index 973ec06af..896520e7d 100644 --- a/rbi/stripe/resources/treasury/credit_reversal.rbi +++ b/rbi/stripe/resources/treasury/credit_reversal.rbi @@ -7,50 +7,64 @@ module Stripe # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. class CreditReversal < APIResource class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the CreditReversal changed status to `posted` sig { returns(T.nilable(Integer)) } attr_reader :posted_at end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # The FinancialAccount to reverse funds from. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The rails used to reverse the funds. - attr_reader :network sig { returns(String) } + attr_reader :network + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The ReceivedCredit being reversed. - attr_reader :received_credit sig { returns(String) } + attr_reader :received_credit + # Status of the CreditReversal + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/debit_reversal.rbi b/rbi/stripe/resources/treasury/debit_reversal.rbi index d611cf1df..53877a75a 100644 --- a/rbi/stripe/resources/treasury/debit_reversal.rbi +++ b/rbi/stripe/resources/treasury/debit_reversal.rbi @@ -7,57 +7,73 @@ module Stripe # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. class DebitReversal < APIResource class LinkedFlows < Stripe::StripeObject + # Set if there is an Issuing dispute associated with the DebitReversal. sig { returns(T.nilable(String)) } attr_reader :issuing_dispute end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the DebitReversal changed status to `completed`. sig { returns(T.nilable(Integer)) } attr_reader :completed_at end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # The FinancialAccount to reverse funds from. - attr_reader :financial_account sig { returns(T.nilable(String)) } + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LinkedFlows)) } + # Other flows linked to a DebitReversal. + sig { returns(T.nilable(LinkedFlows)) } attr_reader :linked_flows - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # The rails used to reverse the funds. - attr_reader :network sig { returns(String) } + attr_reader :network + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The ReceivedDebit being reversed. - attr_reader :received_debit sig { returns(String) } + attr_reader :received_debit + # Status of the DebitReversal + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi index eff745d44..377c17f2d 100644 --- a/rbi/stripe/resources/treasury/financial_account.rbi +++ b/rbi/stripe/resources/treasury/financial_account.rbi @@ -8,98 +8,129 @@ module Stripe # FinancialAccounts serve as the source and destination of Treasury's money movement APIs. class FinancialAccount < APIResource class Balance < Stripe::StripeObject + # Funds the user can spend right now. sig { returns(T::Hash[String, Integer]) } attr_reader :cash + # Funds not spendable yet, but will become available at a later time. sig { returns(T::Hash[String, Integer]) } attr_reader :inbound_pending + # Funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(T::Hash[String, Integer]) } attr_reader :outbound_pending end class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject + # The name of the person or business that owns the bank account. sig { returns(String) } attr_reader :account_holder_name + # The account number. sig { returns(T.nilable(String)) } attr_reader :account_number + # The last four characters of the account number. sig { returns(String) } attr_reader :account_number_last4 + # Name of the bank. sig { returns(String) } attr_reader :bank_name + # Routing number for the account. sig { returns(String) } attr_reader :routing_number end + # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba + # The list of networks that the address supports sig { returns(T::Array[String]) } attr_reader :supported_networks + # The type of financial address sig { returns(String) } attr_reader :type end class PlatformRestrictions < Stripe::StripeObject + # Restricts all inbound money movement. sig { returns(T.nilable(String)) } attr_reader :inbound_flows + # Restricts all outbound money movement. sig { returns(T.nilable(String)) } attr_reader :outbound_flows end class StatusDetails < Stripe::StripeObject class Closed < Stripe::StripeObject + # The array that contains reasons for a FinancialAccount closure. sig { returns(T::Array[String]) } attr_reader :reasons end + # Details related to the closure of this FinancialAccount sig { returns(T.nilable(Closed)) } attr_reader :closed end - sig { returns(T::Array[String]) } # The array of paths to active Features in the Features hash. + sig { returns(T::Array[String]) } attr_reader :active_features - sig { returns(Balance) } + # Balance information for the FinancialAccount + sig { returns(Balance) } attr_reader :balance - sig { returns(String) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } attr_reader :country - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + sig { returns(T.nilable(String)) } attr_reader :display_name - sig { returns(Stripe::Treasury::FinancialAccountFeatures) } + # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. # Stripe or the platform can control Features via the requested field. + sig { returns(Stripe::Treasury::FinancialAccountFeatures) } attr_reader :features - sig { returns(T::Array[FinancialAddress]) } + # The set of credentials that resolve to a FinancialAccount. + sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[String]) } + # The array of paths to pending Features in the Features hash. + sig { returns(T::Array[String]) } attr_reader :pending_features - sig { returns(T.nilable(PlatformRestrictions)) } + # The set of functionalities that the platform can restrict on the FinancialAccount. + sig { returns(T.nilable(PlatformRestrictions)) } attr_reader :platform_restrictions - sig { returns(T::Array[String]) } + # The array of paths to restricted Features in the Features hash. + sig { returns(T::Array[String]) } attr_reader :restricted_features - sig { returns(String) } + # Status of this FinancialAccount. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } + # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details - sig { returns(T::Array[String]) } + # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + sig { returns(T::Array[String]) } attr_reader :supported_currencies end end diff --git a/rbi/stripe/resources/treasury/financial_account_features.rbi b/rbi/stripe/resources/treasury/financial_account_features.rbi index 672124d22..963f94413 100644 --- a/rbi/stripe/resources/treasury/financial_account_features.rbi +++ b/rbi/stripe/resources/treasury/financial_account_features.rbi @@ -9,193 +9,261 @@ module Stripe class FinancialAccountFeatures < APIResource class CardIssuing < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class DepositInsurance < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class FinancialAddresses < Stripe::StripeObject class Aba < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Requested bank partner for this Financial Account sig { returns(String) } attr_reader :bank + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling the ABA address feature sig { returns(Aba) } attr_reader :aba end class InboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling an ACH specific feature sig { returns(Ach) } attr_reader :ach end class IntraStripeFlows < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class OutboundPayments < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling an ACH specific feature sig { returns(Ach) } attr_reader :ach + # Toggle settings for enabling/disabling a feature sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end class OutboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling an ACH specific feature sig { returns(Ach) } attr_reader :ach + # Toggle settings for enabling/disabling a feature sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - sig { returns(CardIssuing) } # Toggle settings for enabling/disabling a feature + sig { returns(CardIssuing) } attr_reader :card_issuing - sig { returns(DepositInsurance) } + # Toggle settings for enabling/disabling a feature + sig { returns(DepositInsurance) } attr_reader :deposit_insurance - sig { returns(FinancialAddresses) } + # Settings related to Financial Addresses features on a Financial Account + sig { returns(FinancialAddresses) } attr_reader :financial_addresses - sig { returns(InboundTransfers) } + # InboundTransfers contains inbound transfers features for a FinancialAccount. + sig { returns(InboundTransfers) } attr_reader :inbound_transfers - sig { returns(IntraStripeFlows) } + # Toggle settings for enabling/disabling a feature + sig { returns(IntraStripeFlows) } attr_reader :intra_stripe_flows - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(OutboundPayments) } + # Settings related to Outbound Payments features on a Financial Account + sig { returns(OutboundPayments) } attr_reader :outbound_payments - sig { returns(OutboundTransfers) } + # OutboundTransfers contains outbound transfers features for a FinancialAccount. + sig { returns(OutboundTransfers) } attr_reader :outbound_transfers end end diff --git a/rbi/stripe/resources/treasury/inbound_transfer.rbi b/rbi/stripe/resources/treasury/inbound_transfer.rbi index 694cf5077..2604cb156 100644 --- a/rbi/stripe/resources/treasury/inbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/inbound_transfer.rbi @@ -9,128 +9,172 @@ module Stripe # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) class InboundTransfer < APIResource class FailureDetails < Stripe::StripeObject + # Reason for the failure. sig { returns(String) } attr_reader :code end class LinkedFlows < Stripe::StripeObject + # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. sig { returns(T.nilable(String)) } attr_reader :received_debit end class OriginPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # The type of the payment method used in the InboundTransfer. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when an InboundTransfer changed status to `canceled`. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Timestamp describing when an InboundTransfer changed status to `failed`. sig { returns(T.nilable(Integer)) } attr_reader :failed_at + # Timestamp describing when an InboundTransfer changed status to `succeeded`. sig { returns(T.nilable(Integer)) } attr_reader :succeeded_at end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Boolean) } + # Returns `true` if the InboundTransfer is able to be canceled. + sig { returns(T::Boolean) } attr_reader :cancelable - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(FailureDetails)) } + # Details about this InboundTransfer's failure. Only set when status is `failed`. + sig { returns(T.nilable(FailureDetails)) } attr_reader :failure_details - sig { returns(String) } + # The FinancialAccount that received the funds. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(LinkedFlows) } + # Attribute for field linked_flows + sig { returns(LinkedFlows) } attr_reader :linked_flows - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # The origin payment method to be debited for an InboundTransfer. + sig { returns(T.nilable(String)) } attr_reader :origin_payment_method - sig { returns(T.nilable(OriginPaymentMethodDetails)) } + # Details about the PaymentMethod for an InboundTransfer. + sig { returns(T.nilable(OriginPaymentMethodDetails)) } attr_reader :origin_payment_method_details - sig { returns(T.nilable(T::Boolean)) } + # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + sig { returns(T.nilable(T::Boolean)) } attr_reader :returned - sig { returns(String) } + # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. - attr_reader :statement_descriptor sig { returns(String) } + attr_reader :statement_descriptor + # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/outbound_payment.rbi b/rbi/stripe/resources/treasury/outbound_payment.rbi index 6fdd0acb1..464f24e57 100644 --- a/rbi/stripe/resources/treasury/outbound_payment.rbi +++ b/rbi/stripe/resources/treasury/outbound_payment.rbi @@ -13,166 +13,225 @@ module Stripe class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject + # Token of the FinancialAccount. sig { returns(String) } attr_reader :id + # The rails used to send funds. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account + # The type of the payment method used in the OutboundPayment. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class EndUserDetails < Stripe::StripeObject + # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. sig { returns(T.nilable(String)) } attr_reader :ip_address + # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. sig { returns(T::Boolean) } attr_reader :present end class ReturnedDetails < Stripe::StripeObject + # Reason for the return. sig { returns(String) } attr_reader :code + # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when an OutboundPayment changed status to `canceled`. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Timestamp describing when an OutboundPayment changed status to `failed`. sig { returns(T.nilable(Integer)) } attr_reader :failed_at + # Timestamp describing when an OutboundPayment changed status to `posted`. sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Timestamp describing when an OutboundPayment changed status to `returned`. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundPayment for payments sent over the `ach` network. sig { returns(String) } attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject + # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :chips + # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :imad + # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :omad end + # Attribute for field ach sig { returns(Ach) } attr_reader :ach + # The US bank account network used to send funds. sig { returns(String) } attr_reader :type + # Attribute for field us_domestic_wire sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Boolean) } + # Returns `true` if the object can be canceled, and `false` otherwise. + sig { returns(T::Boolean) } attr_reader :cancelable - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. - attr_reader :customer sig { returns(T.nilable(String)) } + attr_reader :customer + # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description sig { returns(T.nilable(String)) } + attr_reader :description + # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + sig { returns(T.nilable(String)) } attr_reader :destination_payment_method - sig { returns(T.nilable(DestinationPaymentMethodDetails)) } + # Details about the PaymentMethod for an OutboundPayment. + sig { returns(T.nilable(DestinationPaymentMethodDetails)) } attr_reader :destination_payment_method_details - sig { returns(T.nilable(EndUserDetails)) } + # Details about the end user. + sig { returns(T.nilable(EndUserDetails)) } attr_reader :end_user_details - sig { returns(Integer) } + # The date when funds are expected to arrive in the destination account. + sig { returns(Integer) } attr_reader :expected_arrival_date - sig { returns(String) } + # The FinancialAccount that funds were pulled from. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReturnedDetails)) } + # Details about a returned OutboundPayment. Only set when the status is `returned`. + sig { returns(T.nilable(ReturnedDetails)) } attr_reader :returned_details - sig { returns(String) } + # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). - attr_reader :statement_descriptor sig { returns(String) } + attr_reader :statement_descriptor + # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(TrackingDetails)) } + # Details about network-specific tracking information if available. + sig { returns(T.nilable(TrackingDetails)) } attr_reader :tracking_details - sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/outbound_transfer.rbi b/rbi/stripe/resources/treasury/outbound_transfer.rbi index fdca99065..f601a02b1 100644 --- a/rbi/stripe/resources/treasury/outbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/outbound_transfer.rbi @@ -13,159 +13,215 @@ module Stripe class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # The type of the payment method used in the OutboundTransfer. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end + # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach + # The type of flow that originated the OutboundTransfer. sig { returns(String) } attr_reader :type end class ReturnedDetails < Stripe::StripeObject + # Reason for the return. sig { returns(String) } attr_reader :code + # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when an OutboundTransfer changed status to `canceled` sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Timestamp describing when an OutboundTransfer changed status to `failed` sig { returns(T.nilable(Integer)) } attr_reader :failed_at + # Timestamp describing when an OutboundTransfer changed status to `posted` sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Timestamp describing when an OutboundTransfer changed status to `returned` sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. sig { returns(String) } attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject + # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :chips + # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :imad + # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :omad end + # Attribute for field ach sig { returns(Ach) } attr_reader :ach + # The US bank account network used to send funds. sig { returns(String) } attr_reader :type + # Attribute for field us_domestic_wire sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Boolean) } + # Returns `true` if the object can be canceled, and `false` otherwise. + sig { returns(T::Boolean) } attr_reader :cancelable - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description sig { returns(T.nilable(String)) } + attr_reader :description + # The PaymentMethod used as the payment instrument for an OutboundTransfer. + sig { returns(T.nilable(String)) } attr_reader :destination_payment_method - sig { returns(DestinationPaymentMethodDetails) } + # Attribute for field destination_payment_method_details + sig { returns(DestinationPaymentMethodDetails) } attr_reader :destination_payment_method_details - sig { returns(Integer) } + # The date when funds are expected to arrive in the destination account. + sig { returns(Integer) } attr_reader :expected_arrival_date - sig { returns(String) } + # The FinancialAccount that funds were pulled from. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NetworkDetails)) } + # Details about the network used for the OutboundTransfer. + sig { returns(T.nilable(NetworkDetails)) } attr_reader :network_details - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReturnedDetails)) } + # Details about a returned OutboundTransfer. Only set when the status is `returned`. + sig { returns(T.nilable(ReturnedDetails)) } attr_reader :returned_details - sig { returns(String) } + # Information about the OutboundTransfer to be sent to the recipient account. - attr_reader :statement_descriptor sig { returns(String) } + attr_reader :statement_descriptor + # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(TrackingDetails)) } + # Details about network-specific tracking information if available. + sig { returns(T.nilable(TrackingDetails)) } attr_reader :tracking_details - sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/received_credit.rbi b/rbi/stripe/resources/treasury/received_credit.rbi index a293dafdb..3ec511d14 100644 --- a/rbi/stripe/resources/treasury/received_credit.rbi +++ b/rbi/stripe/resources/treasury/received_credit.rbi @@ -9,143 +9,205 @@ module Stripe class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject + # The FinancialAccount ID. sig { returns(String) } attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject + # Bank name. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The routing number for the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Set when `type` is `balance`. sig { returns(String) } attr_reader :balance + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. sig { returns(String) } attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject class SourceFlowDetails < Stripe::StripeObject + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment + # A `Payout` object is created when you receive funds from Stripe, or when you + # initiate a payout to either a bank account or debit card of a [connected + # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + # and list all payouts. Payouts are made on [varying + # schedules](/docs/connect/manage-payout-schedule), depending on your country and + # industry. + # + # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) sig { returns(Stripe::Payout) } attr_reader :payout + # The type of the source flow that originated the ReceivedCredit. sig { returns(String) } attr_reader :type end + # The CreditReversal created as a result of this ReceivedCredit being reversed. sig { returns(T.nilable(String)) } attr_reader :credit_reversal + # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. sig { returns(T.nilable(String)) } attr_reader :issuing_authorization + # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. sig { returns(T.nilable(String)) } attr_reader :issuing_transaction + # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. sig { returns(T.nilable(String)) } attr_reader :source_flow + # The expandable object of the source flow. sig { returns(T.nilable(SourceFlowDetails)) } attr_reader :source_flow_details + # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). sig { returns(T.nilable(String)) } attr_reader :source_flow_type end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end + # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach + # The type of flow that originated the ReceivedCredit. sig { returns(String) } attr_reader :type end class ReversalDetails < Stripe::StripeObject + # Time before which a ReceivedCredit can be reversed. sig { returns(T.nilable(Integer)) } attr_reader :deadline + # Set if a ReceivedCredit cannot be reversed. sig { returns(T.nilable(String)) } attr_reader :restricted_reason end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(String)) } + # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code + # The FinancialAccount that received the funds. - attr_reader :financial_account sig { returns(T.nilable(String)) } + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(InitiatingPaymentMethodDetails) } + # Attribute for field initiating_payment_method_details + sig { returns(InitiatingPaymentMethodDetails) } attr_reader :initiating_payment_method_details - sig { returns(LinkedFlows) } + # Attribute for field linked_flows + sig { returns(LinkedFlows) } attr_reader :linked_flows - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The rails used to send the funds. + sig { returns(String) } attr_reader :network - sig { returns(T.nilable(NetworkDetails)) } + # Details specific to the money movement rails. + sig { returns(T.nilable(NetworkDetails)) } attr_reader :network_details - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReversalDetails)) } + # Details describing when a ReceivedCredit may be reversed. + sig { returns(T.nilable(ReversalDetails)) } attr_reader :reversal_details - sig { returns(String) } + # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/received_debit.rbi b/rbi/stripe/resources/treasury/received_debit.rbi index acd5e2a18..eff9d4935 100644 --- a/rbi/stripe/resources/treasury/received_debit.rbi +++ b/rbi/stripe/resources/treasury/received_debit.rbi @@ -9,133 +9,180 @@ module Stripe class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject + # The FinancialAccount ID. sig { returns(String) } attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject + # Bank name. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The routing number for the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Set when `type` is `balance`. sig { returns(String) } attr_reader :balance + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. sig { returns(String) } attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject + # The DebitReversal created as a result of this ReceivedDebit being reversed. sig { returns(T.nilable(String)) } attr_reader :debit_reversal + # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. sig { returns(T.nilable(String)) } attr_reader :inbound_transfer + # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. sig { returns(T.nilable(String)) } attr_reader :issuing_authorization + # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. sig { returns(T.nilable(String)) } attr_reader :issuing_transaction + # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. sig { returns(T.nilable(String)) } attr_reader :payout + # The ReceivedCredit that Capital withheld from sig { returns(T.nilable(String)) } attr_reader :received_credit_capital_withholding end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end + # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach + # The type of flow that originated the ReceivedDebit. sig { returns(String) } attr_reader :type end class ReversalDetails < Stripe::StripeObject + # Time before which a ReceivedDebit can be reversed. sig { returns(T.nilable(Integer)) } attr_reader :deadline + # Set if a ReceivedDebit can't be reversed. sig { returns(T.nilable(String)) } attr_reader :restricted_reason end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(String)) } + # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code + # The FinancialAccount that funds were pulled from. - attr_reader :financial_account sig { returns(T.nilable(String)) } + attr_reader :financial_account + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(InitiatingPaymentMethodDetails) } + # Attribute for field initiating_payment_method_details + sig { returns(InitiatingPaymentMethodDetails) } attr_reader :initiating_payment_method_details - sig { returns(LinkedFlows) } + # Attribute for field linked_flows + sig { returns(LinkedFlows) } attr_reader :linked_flows - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # The network used for the ReceivedDebit. + sig { returns(String) } attr_reader :network - sig { returns(T.nilable(NetworkDetails)) } + # Details specific to the money movement rails. + sig { returns(T.nilable(NetworkDetails)) } attr_reader :network_details - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReversalDetails)) } + # Details describing when a ReceivedDebit might be reversed. + sig { returns(T.nilable(ReversalDetails)) } attr_reader :reversal_details - sig { returns(String) } + # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/transaction.rbi b/rbi/stripe/resources/treasury/transaction.rbi index 68c4c2e71..25f487040 100644 --- a/rbi/stripe/resources/treasury/transaction.rbi +++ b/rbi/stripe/resources/treasury/transaction.rbi @@ -7,83 +7,125 @@ module Stripe # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. class Transaction < APIResource class BalanceImpact < Stripe::StripeObject + # The change made to funds the user can spend right now. sig { returns(Integer) } attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. sig { returns(Integer) } attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(Integer) } attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. sig { returns(Stripe::Treasury::DebitReversal) } attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) sig { returns(Stripe::Treasury::InboundTransfer) } attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) sig { returns(Stripe::Issuing::Authorization) } attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) sig { returns(Stripe::Treasury::OutboundTransfer) } attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedCredit) } attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedDebit) } attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. sig { returns(String) } attr_reader :type end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the Transaction changed status to `posted`. sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Timestamp describing when the Transaction changed status to `void`. sig { returns(T.nilable(Integer)) } attr_reader :void_at end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(BalanceImpact) } + # Change to a FinancialAccount's balance + sig { returns(BalanceImpact) } attr_reader :balance_impact - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(Stripe::ListObject)) } + # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :entries - sig { returns(String) } + # The FinancialAccount associated with this object. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } + # ID of the flow that created the Transaction. + sig { returns(T.nilable(String)) } attr_reader :flow - sig { returns(T.nilable(FlowDetails)) } + # Details of the flow that created the Transaction. + sig { returns(T.nilable(FlowDetails)) } attr_reader :flow_details - sig { returns(String) } + # Type of the flow that created the Transaction. - attr_reader :flow_type sig { returns(String) } + attr_reader :flow_type + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # Status of the Transaction. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } + # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions end end diff --git a/rbi/stripe/resources/treasury/transaction_entry.rbi b/rbi/stripe/resources/treasury/transaction_entry.rbi index 0bb3955a5..2b9b495b0 100644 --- a/rbi/stripe/resources/treasury/transaction_entry.rbi +++ b/rbi/stripe/resources/treasury/transaction_entry.rbi @@ -7,71 +7,109 @@ module Stripe # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). class TransactionEntry < APIResource class BalanceImpact < Stripe::StripeObject + # The change made to funds the user can spend right now. sig { returns(Integer) } attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. sig { returns(Integer) } attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(Integer) } attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. sig { returns(Stripe::Treasury::DebitReversal) } attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) sig { returns(Stripe::Treasury::InboundTransfer) } attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) sig { returns(Stripe::Issuing::Authorization) } attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) sig { returns(Stripe::Treasury::OutboundTransfer) } attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedCredit) } attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedDebit) } attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. sig { returns(String) } attr_reader :type end - sig { returns(BalanceImpact) } # Change to a FinancialAccount's balance + sig { returns(BalanceImpact) } attr_reader :balance_impact - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(Integer) } + # When the TransactionEntry will impact the FinancialAccount's balance. + sig { returns(Integer) } attr_reader :effective_at - sig { returns(String) } + # The FinancialAccount associated with this object. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } + # Token of the flow associated with the TransactionEntry. + sig { returns(T.nilable(String)) } attr_reader :flow - sig { returns(T.nilable(FlowDetails)) } + # Details of the flow associated with the TransactionEntry. + sig { returns(T.nilable(FlowDetails)) } attr_reader :flow_details - sig { returns(String) } + # Type of the flow associated with the TransactionEntry. - attr_reader :flow_type sig { returns(String) } + attr_reader :flow_type + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction - sig { returns(String) } + # The specific money movement that generated the TransactionEntry. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/usage_record.rbi b/rbi/stripe/resources/usage_record.rbi index 19a45b9da..ebf73d749 100644 --- a/rbi/stripe/resources/usage_record.rbi +++ b/rbi/stripe/resources/usage_record.rbi @@ -10,23 +10,28 @@ module Stripe # # This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). class UsageRecord < APIResource - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } + # The usage quantity for the specified date. + sig { returns(Integer) } attr_reader :quantity - sig { returns(String) } + # The ID of the subscription item this usage record contains data for. + sig { returns(String) } attr_reader :subscription_item - sig { returns(Integer) } + # The timestamp when this usage occurred. + sig { returns(Integer) } attr_reader :timestamp end end \ No newline at end of file diff --git a/rbi/stripe/resources/usage_record_summary.rbi b/rbi/stripe/resources/usage_record_summary.rbi index 9524b5741..ae0d8c170 100644 --- a/rbi/stripe/resources/usage_record_summary.rbi +++ b/rbi/stripe/resources/usage_record_summary.rbi @@ -6,31 +6,39 @@ module Stripe # A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. class UsageRecordSummary < StripeObject class Period < Stripe::StripeObject + # The end date of this usage period. All usage up to and including this point in time is included. sig { returns(T.nilable(Integer)) } attr_reader :end + # The start date of this usage period. All usage after this point in time is included. sig { returns(T.nilable(Integer)) } attr_reader :start end - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } + # The invoice in which this usage period has been billed for. + sig { returns(T.nilable(String)) } attr_reader :invoice - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Period) } + # Attribute for field period + sig { returns(Period) } attr_reader :period - sig { returns(String) } + # The ID of the subscription item this summary is describing. + sig { returns(String) } attr_reader :subscription_item - sig { returns(Integer) } + # The total usage within this usage period. + sig { returns(Integer) } attr_reader :total_usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/meter_event.rbi b/rbi/stripe/resources/v2/billing/meter_event.rbi index ae44845c5..69665cb66 100644 --- a/rbi/stripe/resources/v2/billing/meter_event.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event.rbi @@ -7,29 +7,35 @@ module Stripe module Billing # Fix me empty_doc_string. class MeterEvent < APIResource - sig { returns(String) } # The creation time of this meter event. - attr_reader :created sig { returns(String) } + attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. - attr_reader :event_name sig { returns(String) } + attr_reader :event_name + # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. + sig { returns(String) } attr_reader :identifier - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, String]) } + # The payload of the event. This must contain the fields corresponding to a meter’s # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and # `value_settings.event_payload_key` (default is `value`). Read more about the payload. + sig { returns(T::Hash[String, String]) } attr_reader :payload - sig { returns(String) } + # The time of the event. Must be within the past 35 calendar days or up to # 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(String) } attr_reader :timestamp end end diff --git a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi index c58053b98..6701ef32a 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi @@ -7,32 +7,40 @@ module Stripe module Billing class MeterEventAdjustment < APIResource class Cancel < Stripe::StripeObject + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. sig { returns(String) } attr_reader :identifier end - sig { returns(Cancel) } # Specifies which event to cancel. + sig { returns(Cancel) } attr_reader :cancel - sig { returns(String) } + # The time the adjustment was created. - attr_reader :created sig { returns(String) } + attr_reader :created + # The name of the meter event. Corresponds with the `event_name` field on a meter. - attr_reader :event_name sig { returns(String) } + attr_reader :event_name + # The unique id of this meter event adjustment. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. - attr_reader :object sig { returns(String) } + attr_reader :object + # Open Enum. The meter event adjustment’s status. - attr_reader :status sig { returns(String) } + attr_reader :status + # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/v2/billing/meter_event_session.rbi b/rbi/stripe/resources/v2/billing/meter_event_session.rbi index 4dbab8e6b..c70d2a261 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_session.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_session.rbi @@ -6,24 +6,29 @@ module Stripe module V2 module Billing class MeterEventSession < APIResource - sig { returns(String) } # The authentication token for this session. Use this token when calling the # high-throughput meter event API. - attr_reader :authentication_token sig { returns(String) } + attr_reader :authentication_token + # The creation time of this session. - attr_reader :created sig { returns(String) } + attr_reader :created + # The time at which this session will expire. - attr_reader :expires_at sig { returns(String) } + attr_reader :expires_at + # The unique id of this auth session. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi index 4b6821920..7cd77aba1 100644 --- a/rbi/stripe/resources/v2/event.rbi +++ b/rbi/stripe/resources/v2/event.rbi @@ -7,36 +7,46 @@ module Stripe class Event < APIResource class Reason < Stripe::StripeObject class Request < Stripe::StripeObject + # ID of the API request that caused the event. sig { returns(String) } attr_reader :id + # The idempotency key transmitted during the request. sig { returns(String) } attr_reader :idempotency_key end + # Event reason type. sig { returns(String) } attr_reader :type + # Information on the API request that instigated the event. sig { returns(T.nilable(Request)) } attr_reader :request end - sig { returns(T.nilable(String)) } # Authentication context needed to fetch the event or related object. + sig { returns(T.nilable(String)) } attr_reader :context - sig { returns(String) } + # Time at which the object was created. - attr_reader :created sig { returns(String) } + attr_reader :created + # Unique identifier for the event. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Reason)) } + # Reason for the event. + sig { returns(T.nilable(Reason)) } attr_reader :reason - sig { returns(String) } + # The type of the event. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi index 91f97cd28..5872889bf 100644 --- a/rbi/stripe/resources/v2/event_destination.rbi +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -7,76 +7,99 @@ module Stripe class EventDestination < APIResource class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject + # Reason event destination has been disabled. sig { returns(String) } attr_reader :reason end + # Details about why the event destination has been disabled. sig { returns(T.nilable(Disabled)) } attr_reader :disabled end class AmazonEventbridge < Stripe::StripeObject + # The AWS account ID. sig { returns(String) } attr_reader :aws_account_id + # The ARN of the AWS event source. sig { returns(String) } attr_reader :aws_event_source_arn + # The state of the AWS event source. sig { returns(String) } attr_reader :aws_event_source_status end class WebhookEndpoint < Stripe::StripeObject + # The signing secret of the webhook endpoint, only includable on creation. sig { returns(T.nilable(String)) } attr_reader :signing_secret + # The URL of the webhook endpoint, includable. sig { returns(T.nilable(String)) } attr_reader :url end - sig { returns(String) } # Time at which the object was created. - attr_reader :created sig { returns(String) } + attr_reader :created + # An optional description of what the event destination is used for. + sig { returns(String) } attr_reader :description - sig { returns(T::Array[String]) } + # The list of events to enable for this endpoint. + sig { returns(T::Array[String]) } attr_reader :enabled_events - sig { returns(String) } + # Payload type of events being subscribed to. + sig { returns(String) } attr_reader :event_payload - sig { returns(T.nilable(T::Array[String])) } + # Where events should be routed from. + sig { returns(T.nilable(T::Array[String])) } attr_reader :events_from - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } + # Metadata. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } + # Event destination name. - attr_reader :name sig { returns(String) } + attr_reader :name + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } + # If using the snapshot event payload, the API version events are rendered as. + sig { returns(T.nilable(String)) } attr_reader :snapshot_api_version - sig { returns(String) } + # Status. It can be set to either enabled or disabled. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(StatusDetails)) } + # Additional information about event destination status. + sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details - sig { returns(String) } + # Event destination type. - attr_reader :type sig { returns(String) } + attr_reader :type + # Time at which the object was last updated. + sig { returns(String) } attr_reader :updated - sig { returns(T.nilable(AmazonEventbridge)) } + # Amazon EventBridge configuration. + sig { returns(T.nilable(AmazonEventbridge)) } attr_reader :amazon_eventbridge - sig { returns(T.nilable(WebhookEndpoint)) } + # Webhook endpoint configuration. + sig { returns(T.nilable(WebhookEndpoint)) } attr_reader :webhook_endpoint end end diff --git a/rbi/stripe/resources/webhook_endpoint.rbi b/rbi/stripe/resources/webhook_endpoint.rbi index b72d73542..3894a599a 100644 --- a/rbi/stripe/resources/webhook_endpoint.rbi +++ b/rbi/stripe/resources/webhook_endpoint.rbi @@ -11,44 +11,56 @@ module Stripe # # Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) class WebhookEndpoint < APIResource - sig { returns(T.nilable(String)) } # The API version events are rendered as for this webhook endpoint. - attr_reader :api_version sig { returns(T.nilable(String)) } + attr_reader :api_version + # The ID of the associated Connect application. + sig { returns(T.nilable(String)) } attr_reader :application - sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } + # An optional description of what the webhook is used for. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Array[String]) } + # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + sig { returns(T::Array[String]) } attr_reader :enabled_events - sig { returns(String) } + # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object + # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. - attr_reader :secret sig { returns(String) } + attr_reader :secret + # The status of the webhook. It can be `enabled` or `disabled`. - attr_reader :status sig { returns(String) } + attr_reader :status + # The URL of the webhook endpoint. + sig { returns(String) } attr_reader :url - sig { returns(T::Boolean) } + # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file From 05b2b5825b6f93a8139a89541df9920bfd5ed03c Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Mon, 2 Dec 2024 22:30:29 -0500 Subject: [PATCH 10/10] regen after rebase --- lib/stripe/resources/account.rb | 2 +- lib/stripe/resources/account_session.rb | 10 +- lib/stripe/resources/capability.rb | 2 +- lib/stripe/resources/charge.rb | 65 +++++- lib/stripe/resources/checkout/session.rb | 6 + lib/stripe/resources/funding_instructions.rb | 134 ++++++++++++ lib/stripe/resources/invoice.rb | 4 + lib/stripe/resources/line_item.rb | 27 +++ lib/stripe/resources/payment_intent.rb | 142 ++++++++++++- lib/stripe/resources/quote_preview_invoice.rb | 4 + lib/stripe/resources/setup_attempt.rb | 4 + lib/stripe/resources/setup_intent.rb | 4 + rbi/stripe/resources/account.rbi | 2 +- rbi/stripe/resources/account_session.rbi | 10 +- rbi/stripe/resources/capability.rbi | 2 +- rbi/stripe/resources/charge.rbi | 85 +++++++- rbi/stripe/resources/checkout/session.rbi | 7 + rbi/stripe/resources/funding_instructions.rbi | 187 +++++++++++++++++ rbi/stripe/resources/invoice.rbi | 6 + rbi/stripe/resources/line_item.rbi | 36 +++- rbi/stripe/resources/payment_intent.rbi | 198 +++++++++++++++++- .../resources/quote_preview_invoice.rbi | 6 + rbi/stripe/resources/setup_attempt.rbi | 6 + rbi/stripe/resources/setup_intent.rbi | 6 + 24 files changed, 934 insertions(+), 21 deletions(-) diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 716ccaf76..700487bc9 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -398,7 +398,7 @@ class Error < Stripe::StripeObject end # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. attr_reader :alternatives - # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. attr_reader :current_deadline # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. attr_reader :currently_due diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index 32f187e1a..704770da3 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -20,7 +20,7 @@ def self.object_name class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. attr_reader :disable_stripe_user_authentication # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. attr_reader :external_account_collection @@ -33,7 +33,7 @@ class Features < Stripe::StripeObject class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. attr_reader :disable_stripe_user_authentication # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. attr_reader :external_account_collection @@ -46,7 +46,7 @@ class Features < Stripe::StripeObject class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. attr_reader :disable_stripe_user_authentication # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. attr_reader :edit_payout_schedule @@ -97,7 +97,7 @@ class Features < Stripe::StripeObject; end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. attr_reader :disable_stripe_user_authentication # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. attr_reader :external_account_collection @@ -144,7 +144,7 @@ class Features < Stripe::StripeObject class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. attr_reader :disable_stripe_user_authentication # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. attr_reader :edit_payout_schedule diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb index b57a493d9..d5bab2b96 100644 --- a/lib/stripe/resources/capability.rb +++ b/lib/stripe/resources/capability.rb @@ -31,7 +31,7 @@ class Error < Stripe::StripeObject end # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. attr_reader :alternatives - # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. attr_reader :current_deadline # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. attr_reader :currently_due diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index 81ecee944..ebc1d0825 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -90,6 +90,10 @@ class Rule < Stripe::StripeObject # The predicate to evaluate the payment against. attr_reader :predicate end + # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + attr_reader :network_advice_code + # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. attr_reader :network_status # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. @@ -170,7 +174,31 @@ class Alipay < Stripe::StripeObject end class Alma < Stripe::StripeObject; end - class AmazonPay < Stripe::StripeObject; end + + class AmazonPay < Stripe::StripeObject + class Funding < Stripe::StripeObject + class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # The last four digits of the card. + attr_reader :last4 + end + # Attribute for field card + attr_reader :card + # funding type of the underlying payment method. + attr_reader :type + end + # Attribute for field funding + attr_reader :funding + end class AuBecsDebit < Stripe::StripeObject # Bank-State-Branch number of the bank account. @@ -281,6 +309,11 @@ class Overcapture < Stripe::StripeObject attr_reader :status end + class PartialAuthorization < Stripe::StripeObject + # Indicates whether the transaction requested for partial authorization feature and the authorization outcome. + attr_reader :status + end + class ThreeDSecure < Stripe::StripeObject # For authenticated transactions: how the customer was authenticated by # the issuing bank. @@ -413,6 +446,8 @@ class ShippingAddress < Stripe::StripeObject end # The authorized amount. attr_reader :amount_authorized + # The latest amount intended to be authorized by this charge. + attr_reader :amount_requested # Authorization code on the charge. attr_reader :authorization_code # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -463,6 +498,8 @@ class ShippingAddress < Stripe::StripeObject attr_reader :network_token # Attribute for field overcapture attr_reader :overcapture + # Attribute for field partial_authorization + attr_reader :partial_authorization # Populated if this transaction used 3D Secure authentication. attr_reader :three_d_secure # If this Card is part of a card wallet, this contains the details of the card wallet. @@ -886,7 +923,31 @@ class Promptpay < Stripe::StripeObject class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject; end - class RevolutPay < Stripe::StripeObject; end + + class RevolutPay < Stripe::StripeObject + class Funding < Stripe::StripeObject + class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # The last four digits of the card. + attr_reader :last4 + end + # Attribute for field card + attr_reader :card + # funding type of the underlying payment method. + attr_reader :type + end + # Attribute for field funding + attr_reader :funding + end class SamsungPay < Stripe::StripeObject # A unique identifier for the buyer as determined by the local payment processor. diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index e107abb4b..e7e1b64e3 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -916,6 +916,12 @@ class ManualEntry < Stripe::StripeObject class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + attr_reader :line_items # Determines which entity is allowed to update the shipping details. # # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb index 8e486c4b8..60315cd0e 100644 --- a/lib/stripe/resources/funding_instructions.rb +++ b/lib/stripe/resources/funding_instructions.rb @@ -62,8 +62,41 @@ class BankAddress < Stripe::StripeObject end class Iban < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address # The name of the person or business that owns the bank account attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address # The BIC/SWIFT code of the account. attr_reader :bic # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). @@ -73,15 +106,83 @@ class Iban < Stripe::StripeObject end class SortCode < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address # The name of the person or business that owns the bank account attr_reader :account_holder_name # The account number attr_reader :account_number + # Attribute for field bank_address + attr_reader :bank_address # The six-digit sort code attr_reader :sort_code end class Spei < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address # The three-digit bank code attr_reader :bank_code # The short banking institution name @@ -137,12 +238,45 @@ class BankAddress < Stripe::StripeObject end class Zengin < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address # The account holder name attr_reader :account_holder_name # The account number attr_reader :account_number # The bank account type. In Japan, this can only be `futsu` or `toza`. attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address # The bank code of the account attr_reader :bank_code # The bank name of the account diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 9082e50c6..3734f3353 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -165,6 +165,10 @@ class LastFinalizationError < Stripe::StripeObject attr_reader :doc_url # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. attr_reader :param # A PaymentIntent guides you through the process of collecting a payment from your customer. diff --git a/lib/stripe/resources/line_item.rb b/lib/stripe/resources/line_item.rb index a9af7425d..65db1431a 100644 --- a/lib/stripe/resources/line_item.rb +++ b/lib/stripe/resources/line_item.rb @@ -9,6 +9,15 @@ def self.object_name "item" end + class AdjustableQuantity < Stripe::StripeObject + # Attribute for field enabled + attr_reader :enabled + # Attribute for field maximum + attr_reader :maximum + # Attribute for field minimum + attr_reader :minimum + end + class Discount < Stripe::StripeObject # The amount discounted. attr_reader :amount @@ -19,6 +28,15 @@ class Discount < Stripe::StripeObject attr_reader :discount end + class Display < Stripe::StripeObject + # Attribute for field description + attr_reader :description + # Attribute for field images + attr_reader :images + # Attribute for field name + attr_reader :name + end + class Tax < Stripe::StripeObject # Amount of tax applied for this rate. attr_reader :amount @@ -31,6 +49,9 @@ class Tax < Stripe::StripeObject # The amount on which tax is calculated, in cents (or local equivalent). attr_reader :taxable_amount end + # Attribute for field adjustable_quantity + attr_reader :adjustable_quantity + # Total discount amount applied. If no discounts were applied, defaults to 0. attr_reader :amount_discount @@ -52,9 +73,15 @@ class Tax < Stripe::StripeObject # The discounts applied to the line item. attr_reader :discounts + # Attribute for field display + attr_reader :display + # Unique identifier for the object. attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 1513327ba..57f377314 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -66,6 +66,10 @@ class LastPaymentError < Stripe::StripeObject attr_reader :doc_url # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. attr_reader :param # A PaymentIntent guides you through the process of collecting a payment from your customer. @@ -214,8 +218,41 @@ class BankAddress < Stripe::StripeObject end class Iban < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address # The name of the person or business that owns the bank account attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address # The BIC/SWIFT code of the account. attr_reader :bic # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). @@ -225,15 +262,83 @@ class Iban < Stripe::StripeObject end class SortCode < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address # The name of the person or business that owns the bank account attr_reader :account_holder_name # The account number attr_reader :account_number + # Attribute for field bank_address + attr_reader :bank_address # The six-digit sort code attr_reader :sort_code end class Spei < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address # The three-digit bank code attr_reader :bank_code # The short banking institution name @@ -289,12 +394,45 @@ class BankAddress < Stripe::StripeObject end class Zengin < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field account_holder_address + attr_reader :account_holder_address # The account holder name attr_reader :account_holder_name # The account number attr_reader :account_number # The bank account type. In Japan, this can only be `futsu` or `toza`. attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address # The bank code of the account attr_reader :bank_code # The bank name of the account @@ -974,6 +1112,8 @@ class Address < Stripe::StripeObject attr_reader :request_multicapture # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. attr_reader :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_reader :request_partial_authorization # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. attr_reader :request_three_d_secure # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). @@ -1457,7 +1597,7 @@ class Sofort < Stripe::StripeObject end class Swish < Stripe::StripeObject - # The order ID displayed in the Swish app after the payment is authorized. + # A reference for this payment to be displayed in the Swish app. attr_reader :reference # Indicates that you intend to make future payments with this PaymentIntent's payment method. # diff --git a/lib/stripe/resources/quote_preview_invoice.rb b/lib/stripe/resources/quote_preview_invoice.rb index 3109eccbe..9268b3533 100644 --- a/lib/stripe/resources/quote_preview_invoice.rb +++ b/lib/stripe/resources/quote_preview_invoice.rb @@ -164,6 +164,10 @@ class LastFinalizationError < Stripe::StripeObject attr_reader :doc_url # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. attr_reader :param # A PaymentIntent guides you through the process of collecting a payment from your customer. diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index 735af7ffa..d87da884d 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -244,6 +244,10 @@ class SetupError < Stripe::StripeObject attr_reader :doc_url # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. attr_reader :param # A PaymentIntent guides you through the process of collecting a payment from your customer. diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index c40dba030..b7ef78516 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -53,6 +53,10 @@ class LastSetupError < Stripe::StripeObject attr_reader :doc_url # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. attr_reader :param # A PaymentIntent guides you through the process of collecting a payment from your customer. diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 628fb2ec2..e4a909925 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -519,7 +519,7 @@ module Stripe # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi index 08c4592e2..ed8dd924f 100644 --- a/rbi/stripe/resources/account_session.rbi +++ b/rbi/stripe/resources/account_session.rbi @@ -14,7 +14,7 @@ module Stripe class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. @@ -30,7 +30,7 @@ module Stripe end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. @@ -46,7 +46,7 @@ module Stripe end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -107,7 +107,7 @@ module Stripe end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. @@ -167,7 +167,7 @@ module Stripe end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi index c9927b744..8c0dd5e0c 100644 --- a/rbi/stripe/resources/capability.rbi +++ b/rbi/stripe/resources/capability.rbi @@ -30,7 +30,7 @@ module Stripe # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index 2afcdbb90..02e0e3af1 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -102,6 +102,12 @@ module Stripe sig { returns(String) } attr_reader :predicate end + # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + sig { returns(T.nilable(String)) } + attr_reader :network_advice_code + # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + sig { returns(T.nilable(String)) } + attr_reader :network_decline_code # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. sig { returns(T.nilable(String)) } attr_reader :network_status @@ -204,7 +210,39 @@ module Stripe attr_reader :transaction_id end class Alma < Stripe::StripeObject; end - class AmazonPay < Stripe::StripeObject; end + class AmazonPay < Stripe::StripeObject + class Funding < Stripe::StripeObject + class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + sig { returns(T.nilable(String)) } + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + sig { returns(T.nilable(String)) } + attr_reader :country + # Two-digit number representing the card's expiration month. + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + sig { returns(T.nilable(String)) } + attr_reader :funding + # The last four digits of the card. + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + # Attribute for field card + sig { returns(Card) } + attr_reader :card + # funding type of the underlying payment method. + sig { returns(T.nilable(String)) } + attr_reader :type + end + # Attribute for field funding + sig { returns(Funding) } + attr_reader :funding + end class AuBecsDebit < Stripe::StripeObject # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } @@ -333,6 +371,11 @@ module Stripe sig { returns(String) } attr_reader :status end + class PartialAuthorization < Stripe::StripeObject + # Indicates whether the transaction requested for partial authorization feature and the authorization outcome. + sig { returns(String) } + attr_reader :status + end class ThreeDSecure < Stripe::StripeObject # For authenticated transactions: how the customer was authenticated by # the issuing bank. @@ -509,6 +552,9 @@ module Stripe # The authorized amount. sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # The latest amount intended to be authorized by this charge. + sig { returns(T.nilable(Integer)) } + attr_reader :amount_requested # Authorization code on the charge. sig { returns(T.nilable(String)) } attr_reader :authorization_code @@ -582,6 +628,9 @@ module Stripe # Attribute for field overcapture sig { returns(Overcapture) } attr_reader :overcapture + # Attribute for field partial_authorization + sig { returns(PartialAuthorization) } + attr_reader :partial_authorization # Populated if this transaction used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure @@ -1117,7 +1166,39 @@ module Stripe end class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject; end - class RevolutPay < Stripe::StripeObject; end + class RevolutPay < Stripe::StripeObject + class Funding < Stripe::StripeObject + class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + sig { returns(T.nilable(String)) } + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + sig { returns(T.nilable(String)) } + attr_reader :country + # Two-digit number representing the card's expiration month. + sig { returns(T.nilable(Integer)) } + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(T.nilable(Integer)) } + attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + sig { returns(T.nilable(String)) } + attr_reader :funding + # The last four digits of the card. + sig { returns(T.nilable(String)) } + attr_reader :last4 + end + # Attribute for field card + sig { returns(Card) } + attr_reader :card + # funding type of the underlying payment method. + sig { returns(T.nilable(String)) } + attr_reader :type + end + # Attribute for field funding + sig { returns(Funding) } + attr_reader :funding + end class SamsungPay < Stripe::StripeObject # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index c7b52e2f3..e90f75931 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -1075,6 +1075,13 @@ module Stripe end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + sig { returns(T.nilable(String)) } + attr_reader :line_items # Determines which entity is allowed to update the shipping details. # # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi index 2dc445660..8fbb87eda 100644 --- a/rbi/stripe/resources/funding_instructions.rbi +++ b/rbi/stripe/resources/funding_instructions.rbi @@ -75,9 +75,55 @@ module Stripe attr_reader :routing_number end class Iban < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic @@ -89,17 +135,112 @@ module Stripe attr_reader :iban end class SortCode < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name # The account number sig { returns(String) } attr_reader :account_number + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address + # The account holder name + sig { returns(String) } + attr_reader :account_holder_name + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The three-digit bank code sig { returns(String) } attr_reader :bank_code @@ -174,6 +315,49 @@ module Stripe attr_reader :swift_code end class Zengin < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name @@ -183,6 +367,9 @@ module Stripe # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index 78babc005..4d3a73ece 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -186,6 +186,12 @@ module Stripe # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + sig { returns(String) } + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + sig { returns(String) } + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi index c6124ff0e..c2361be63 100644 --- a/rbi/stripe/resources/line_item.rbi +++ b/rbi/stripe/resources/line_item.rbi @@ -5,6 +5,17 @@ module Stripe # A line item. class LineItem < APIResource + class AdjustableQuantity < Stripe::StripeObject + # Attribute for field enabled + sig { returns(T::Boolean) } + attr_reader :enabled + # Attribute for field maximum + sig { returns(T.nilable(Integer)) } + attr_reader :maximum + # Attribute for field minimum + sig { returns(T.nilable(Integer)) } + attr_reader :minimum + end class Discount < Stripe::StripeObject # The amount discounted. sig { returns(Integer) } @@ -16,6 +27,17 @@ module Stripe sig { returns(Stripe::Discount) } attr_reader :discount end + class Display < Stripe::StripeObject + # Attribute for field description + sig { returns(T.nilable(String)) } + attr_reader :description + # Attribute for field images + sig { returns(T::Array[String]) } + attr_reader :images + # Attribute for field name + sig { returns(String) } + attr_reader :name + end class Tax < Stripe::StripeObject # Amount of tax applied for this rate. sig { returns(Integer) } @@ -32,6 +54,10 @@ module Stripe sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Attribute for field adjustable_quantity + sig { returns(T.nilable(AdjustableQuantity)) } + attr_reader :adjustable_quantity + # Total discount amount applied. If no discounts were applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_discount @@ -53,17 +79,25 @@ module Stripe attr_reader :currency # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. - sig { returns(String) } + sig { returns(T.nilable(String)) } attr_reader :description # The discounts applied to the line item. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Attribute for field display + sig { returns(Display) } + attr_reader :display + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } attr_reader :object diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index d4029a04b..a8bb60a2d 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -66,6 +66,12 @@ module Stripe # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + sig { returns(String) } + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + sig { returns(String) } + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param @@ -250,9 +256,55 @@ module Stripe attr_reader :routing_number end class Iban < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic @@ -264,17 +316,112 @@ module Stripe attr_reader :iban end class SortCode < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name # The account number sig { returns(String) } attr_reader :account_number + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address + # The account holder name + sig { returns(String) } + attr_reader :account_holder_name + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The three-digit bank code sig { returns(String) } attr_reader :bank_code @@ -349,6 +496,49 @@ module Stripe attr_reader :swift_code end class Zengin < Stripe::StripeObject + class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_reader :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_reader :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_reader :state + end + # Attribute for field account_holder_address + sig { returns(AccountHolderAddress) } + attr_reader :account_holder_address # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name @@ -358,6 +548,9 @@ module Stripe # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type + # Attribute for field bank_address + sig { returns(BankAddress) } + attr_reader :bank_address # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code @@ -1226,6 +1419,9 @@ module Stripe # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_reader :request_partial_authorization # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure @@ -1764,7 +1960,7 @@ module Stripe attr_reader :setup_future_usage end class Swish < Stripe::StripeObject - # The order ID displayed in the Swish app after the payment is authorized. + # A reference for this payment to be displayed in the Swish app. sig { returns(T.nilable(String)) } attr_reader :reference # Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/rbi/stripe/resources/quote_preview_invoice.rbi b/rbi/stripe/resources/quote_preview_invoice.rbi index a6015a825..ce57043cd 100644 --- a/rbi/stripe/resources/quote_preview_invoice.rbi +++ b/rbi/stripe/resources/quote_preview_invoice.rbi @@ -197,6 +197,12 @@ module Stripe # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + sig { returns(String) } + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + sig { returns(String) } + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi index e945c8ef7..7ab5b6ea4 100644 --- a/rbi/stripe/resources/setup_attempt.rbi +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -308,6 +308,12 @@ module Stripe # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + sig { returns(String) } + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + sig { returns(String) } + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index 63f652694..314181d3e 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -51,6 +51,12 @@ module Stripe # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + sig { returns(String) } + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + sig { returns(String) } + attr_reader :network_decline_code # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param