stripe 19.2.0 → 19.3.0.pre.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stripe/api_requestor.rb +36 -3
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +87 -0
- data/lib/stripe/event_types.rb +228 -0
- data/lib/stripe/events/unknown_event_notification.rb +1 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_completed_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_created_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_ready_for_upload_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_timeout_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_upload_timeout_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_validating_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_validation_failed_event.rb +44 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +78 -0
- data/lib/stripe/events/v2_data_reporting_query_run_created_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_failed_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_updated_event.rb +44 -0
- data/lib/stripe/events/v2_extend_workflow_run_failed_event.rb +75 -0
- data/lib/stripe/events/v2_extend_workflow_run_started_event.rb +44 -0
- data/lib/stripe/events/v2_extend_workflow_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +61 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_method_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +61 -0
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +63 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +44 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_confirmed_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_created_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_partially_confirmed_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_terminated_event.rb +97 -0
- data/lib/stripe/object_types.rb +61 -0
- data/lib/stripe/params/account_create_params.rb +374 -1
- data/lib/stripe/params/account_notice_list_params.rb +25 -0
- data/lib/stripe/params/account_notice_retrieve_params.rb +13 -0
- data/lib/stripe/params/account_notice_update_params.rb +36 -0
- data/lib/stripe/params/account_session_create_params.rb +226 -1
- data/lib/stripe/params/account_update_params.rb +336 -0
- data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
- data/lib/stripe/params/capital/financing_offer_list_params.rb +58 -0
- data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +15 -0
- data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +15 -0
- data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +15 -0
- data/lib/stripe/params/capital/financing_transaction_list_params.rb +45 -0
- data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/charge_capture_params.rb +1646 -0
- data/lib/stripe/params/charge_update_params.rb +1646 -0
- data/lib/stripe/params/checkout/session_create_params.rb +126 -3
- data/lib/stripe/params/checkout/session_update_params.rb +176 -1
- data/lib/stripe/params/confirmation_token_create_params.rb +78 -0
- data/lib/stripe/params/coupon_create_params.rb +17 -1
- data/lib/stripe/params/customer_session_create_params.rb +32 -1
- data/lib/stripe/params/dispute_update_params.rb +10 -1
- data/lib/stripe/params/external_account_create_params.rb +134 -0
- data/lib/stripe/params/external_account_delete_params.rb +6 -0
- data/lib/stripe/params/external_account_list_params.rb +25 -0
- data/lib/stripe/params/external_account_retrieve_params.rb +13 -0
- data/lib/stripe/params/external_account_update_params.rb +91 -0
- data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +24 -0
- data/lib/stripe/params/financial_connections/authorization_retrieve_params.rb +15 -0
- data/lib/stripe/params/financial_connections/institution_list_params.rb +24 -0
- data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +15 -0
- data/lib/stripe/params/financial_connections/session_create_params.rb +64 -2
- data/lib/stripe/params/fx_quote_create_params.rb +73 -0
- data/lib/stripe/params/fx_quote_list_params.rb +22 -0
- data/lib/stripe/params/fx_quote_retrieve_params.rb +13 -0
- data/lib/stripe/params/invoice_add_lines_params.rb +48 -1
- data/lib/stripe/params/invoice_attach_payment_params.rb +43 -1
- data/lib/stripe/params/invoice_create_params.rb +70 -2
- data/lib/stripe/params/invoice_create_preview_params.rb +790 -9
- data/lib/stripe/params/invoice_detach_payment_params.rb +16 -0
- data/lib/stripe/params/invoice_item_create_params.rb +33 -1
- data/lib/stripe/params/invoice_item_update_params.rb +33 -1
- data/lib/stripe/params/invoice_line_item_update_params.rb +48 -1
- data/lib/stripe/params/invoice_update_lines_params.rb +48 -1
- data/lib/stripe/params/invoice_update_params.rb +70 -2
- data/lib/stripe/params/issuing/cardholder_create_params.rb +2 -1
- data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +163 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +50 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +128 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_list_params.rb +24 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +86 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/dispute_settlement_detail_list_params.rb +33 -0
- data/lib/stripe/params/issuing/dispute_settlement_detail_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/fraud_liability_debit_list_params.rb +44 -0
- data/lib/stripe/params/issuing/fraud_liability_debit_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/transaction_list_params.rb +4 -0
- data/lib/stripe/params/mandate_list_params.rb +39 -0
- data/lib/stripe/params/margin_create_params.rb +25 -0
- data/lib/stripe/params/margin_list_params.rb +25 -0
- data/lib/stripe/params/margin_retrieve_params.rb +13 -0
- data/lib/stripe/params/margin_update_params.rb +22 -0
- data/lib/stripe/params/order_create_params.rb +2083 -0
- data/lib/stripe/params/order_list_params.rb +25 -0
- data/lib/stripe/params/order_retrieve_params.rb +13 -0
- data/lib/stripe/params/order_submit_params.rb +16 -0
- data/lib/stripe/params/order_update_params.rb +2087 -0
- data/lib/stripe/params/payment_intent_capture_params.rb +1643 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +3022 -87
- data/lib/stripe/params/payment_intent_create_params.rb +3034 -99
- data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +297 -0
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +37 -0
- data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
- data/lib/stripe/params/payment_intent_update_params.rb +3023 -57
- data/lib/stripe/params/payment_link_create_params.rb +15 -0
- data/lib/stripe/params/payment_method_configuration_create_params.rb +105 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +105 -0
- data/lib/stripe/params/payment_method_create_params.rb +74 -0
- data/lib/stripe/params/plan_create_params.rb +15 -0
- data/lib/stripe/params/price_create_params.rb +15 -0
- data/lib/stripe/params/price_update_params.rb +19 -0
- data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_create_params.rb +67 -0
- data/lib/stripe/params/privacy/redaction_job_list_params.rb +27 -0
- data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_run_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_update_params.rb +18 -0
- data/lib/stripe/params/privacy/redaction_job_validate_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +24 -0
- data/lib/stripe/params/product_catalog/trial_offer_create_params.rb +63 -0
- data/lib/stripe/params/product_create_params.rb +16 -0
- data/lib/stripe/params/product_update_params.rb +16 -0
- data/lib/stripe/params/quote_create_params.rb +809 -3
- data/lib/stripe/params/quote_line_list_params.rb +22 -0
- data/lib/stripe/params/quote_list_lines_params.rb +22 -0
- data/lib/stripe/params/quote_list_params.rb +4 -0
- data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +22 -0
- data/lib/stripe/params/quote_mark_draft_params.rb +13 -0
- data/lib/stripe/params/quote_mark_stale_params.rb +16 -0
- data/lib/stripe/params/quote_preview_invoice_list_params.rb +22 -0
- data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +22 -0
- data/lib/stripe/params/quote_reestimate_params.rb +13 -0
- data/lib/stripe/params/quote_update_params.rb +817 -4
- data/lib/stripe/params/reserve/hold_list_params.rb +53 -0
- data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -0
- data/lib/stripe/params/reserve/plan_retrieve_params.rb +15 -0
- data/lib/stripe/params/reserve/release_list_params.rb +41 -0
- data/lib/stripe/params/reserve/release_retrieve_params.rb +15 -0
- data/lib/stripe/params/setup_intent_confirm_params.rb +108 -3
- data/lib/stripe/params/setup_intent_create_params.rb +108 -3
- data/lib/stripe/params/setup_intent_update_params.rb +108 -3
- data/lib/stripe/params/shared_payment/granted_token_create_params.rb +47 -0
- data/lib/stripe/params/shared_payment/granted_token_retrieve_params.rb +15 -0
- data/lib/stripe/params/shared_payment/granted_token_revoke_params.rb +15 -0
- data/lib/stripe/params/shared_payment/issued_token_create_params.rb +67 -0
- data/lib/stripe/params/shared_payment/issued_token_retrieve_params.rb +15 -0
- data/lib/stripe/params/shared_payment/issued_token_revoke_params.rb +15 -0
- data/lib/stripe/params/subscription_create_params.rb +170 -6
- data/lib/stripe/params/subscription_item_create_params.rb +62 -2
- data/lib/stripe/params/subscription_item_update_params.rb +45 -1
- data/lib/stripe/params/subscription_pause_params.rb +50 -0
- data/lib/stripe/params/subscription_resume_params.rb +4 -0
- data/lib/stripe/params/subscription_schedule_amend_params.rb +578 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +167 -5
- data/lib/stripe/params/subscription_schedule_update_params.rb +167 -5
- data/lib/stripe/params/subscription_update_params.rb +153 -5
- data/lib/stripe/params/tax/calculation_create_params.rb +4 -0
- data/lib/stripe/params/tax/form_list_params.rb +51 -0
- data/lib/stripe/params/tax/form_pdf_params.rb +15 -0
- data/lib/stripe/params/tax/form_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/location_create_params.rb +54 -0
- data/lib/stripe/params/tax/location_list_params.rb +27 -0
- data/lib/stripe/params/tax/location_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/registration_create_params.rb +104 -0
- data/lib/stripe/params/terminal/configuration_create_params.rb +13 -0
- data/lib/stripe/params/terminal/configuration_update_params.rb +13 -0
- data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +78 -0
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +49 -0
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_revoke_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +25 -1
- data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +25 -1
- data/lib/stripe/params/transfer_create_params.rb +4 -0
- data/lib/stripe/params/treasury/financial_account_create_params.rb +8 -1
- data/lib/stripe/params/treasury/financial_account_features_update_params.rb +4 -1
- data/lib/stripe/params/treasury/financial_account_update_features_params.rb +4 -1
- data/lib/stripe/params/treasury/financial_account_update_params.rb +8 -1
- data/lib/stripe/params/treasury/outbound_payment_create_params.rb +4 -0
- data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +24 -0
- data/lib/stripe/params/treasury/received_credit_create_params.rb +25 -1
- data/lib/stripe/params/treasury/received_debit_create_params.rb +25 -1
- data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +74 -0
- data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +21 -0
- data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +80 -0
- data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/cadence_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/billing/cadence_create_params.rb +253 -0
- data/lib/stripe/params/v2/billing/cadence_list_params.rb +43 -0
- data/lib/stripe/params/v2/billing/cadence_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/billing/cadence_update_params.rb +75 -0
- data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +257 -0
- data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +21 -0
- data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +263 -0
- data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/profile_create_params.rb +37 -0
- data/lib/stripe/params/v2/billing/profile_list_params.rb +40 -0
- data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/profile_update_params.rb +35 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +282 -5
- data/lib/stripe/params/v2/core/account_token_create_params.rb +13 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +274 -4
- data/lib/stripe/params/v2/core/batch_job_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/core/batch_job_create_params.rb +58 -0
- data/lib/stripe/params/v2/core/batch_job_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_acknowledge_confirmation_of_payee_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_archive_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +58 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_initiate_confirmation_of_payee_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_list_params.rb +19 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_archive_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_confirm_microdeposits_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +37 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_list_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_update_params.rb +22 -0
- data/lib/stripe/params/v2/data/reporting/query_run_create_params.rb +31 -0
- data/lib/stripe/params/v2/data/reporting/query_run_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/extend/workflow_invoke_params.rb +17 -0
- data/lib/stripe/params/v2/extend/workflow_list_params.rb +21 -0
- data/lib/stripe/params/v2/extend/workflow_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/extend/workflow_run_list_params.rb +23 -0
- data/lib/stripe/params/v2/extend/workflow_run_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/iam/activity_log_list_params.rb +23 -0
- data/lib/stripe/params/v2/iam/activity_log_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/adjustment_list_params.rb +48 -0
- data/lib/stripe/params/v2/money_management/adjustment_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +28 -0
- data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +34 -0
- data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +23 -0
- data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +50 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_list_params.rb +44 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +102 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_list_params.rb +52 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +67 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +92 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_list_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +88 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +77 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +48 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_method_archive_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_method_list_params.rb +31 -0
- data/lib/stripe/params/v2/money_management/payout_method_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_method_unarchive_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_methods_bank_account_spec_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/received_credit_list_params.rb +44 -0
- data/lib/stripe/params/v2/money_management/received_credit_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/transaction_entry_list_params.rb +43 -0
- data/lib/stripe/params/v2/money_management/transaction_entry_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/transaction_list_params.rb +47 -0
- data/lib/stripe/params/v2/money_management/transaction_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/network/business_profile_me_params.rb +10 -0
- data/lib/stripe/params/v2/network/business_profile_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_confirm_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_create_params.rb +17 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_list_params.rb +20 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_terminate_params.rb +10 -0
- data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +23 -0
- data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +10 -0
- data/lib/stripe/params.rb +426 -0
- data/lib/stripe/resources/account.rb +259 -1
- data/lib/stripe/resources/account_notice.rb +94 -0
- data/lib/stripe/resources/account_session.rb +81 -0
- data/lib/stripe/resources/balance.rb +83 -0
- data/lib/stripe/resources/billing/alert_triggered.rb +4 -0
- data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
- data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +38 -0
- data/lib/stripe/resources/capital/financing_offer.rb +142 -0
- data/lib/stripe/resources/capital/financing_summary.rb +82 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
- data/lib/stripe/resources/card.rb +2 -0
- data/lib/stripe/resources/charge.rb +211 -1
- data/lib/stripe/resources/checkout/session.rb +75 -3
- data/lib/stripe/resources/confirmation_token.rb +131 -0
- data/lib/stripe/resources/coupon.rb +26 -1
- data/lib/stripe/resources/credit_note_line_item.rb +18 -0
- data/lib/stripe/resources/customer_session.rb +36 -0
- data/lib/stripe/resources/dispute.rb +22 -0
- data/lib/stripe/resources/event.rb +64 -1
- data/lib/stripe/resources/financial_connections/account.rb +57 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
- data/lib/stripe/resources/financial_connections/authorization.rb +82 -0
- data/lib/stripe/resources/financial_connections/institution.rb +127 -0
- data/lib/stripe/resources/financial_connections/session.rb +125 -1
- data/lib/stripe/resources/fx_quote.rb +147 -0
- data/lib/stripe/resources/invoice.rb +117 -1
- data/lib/stripe/resources/invoice_item.rb +2 -0
- data/lib/stripe/resources/invoice_line_item.rb +40 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +263 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +71 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +51 -0
- data/lib/stripe/resources/issuing/settlement.rb +61 -0
- data/lib/stripe/resources/issuing/transaction.rb +2 -0
- data/lib/stripe/resources/line_item.rb +42 -0
- data/lib/stripe/resources/mandate.rb +12 -0
- data/lib/stripe/resources/margin.rb +64 -0
- data/lib/stripe/resources/order.rb +927 -0
- data/lib/stripe/resources/payment_attempt_record.rb +177 -1
- data/lib/stripe/resources/payment_intent.rb +1561 -8
- data/lib/stripe/resources/payment_method.rb +135 -0
- data/lib/stripe/resources/payment_method_configuration.rb +170 -0
- data/lib/stripe/resources/payment_record.rb +177 -1
- data/lib/stripe/resources/price.rb +20 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +189 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
- data/lib/stripe/resources/product.rb +18 -0
- data/lib/stripe/resources/product_catalog/trial_offer.rb +106 -0
- data/lib/stripe/resources/quote.rb +569 -2
- data/lib/stripe/resources/quote_line.rb +525 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1183 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +736 -0
- data/lib/stripe/resources/refund.rb +18 -0
- data/lib/stripe/resources/reserve/hold.rb +7 -0
- data/lib/stripe/resources/reserve/release.rb +12 -0
- data/lib/stripe/resources/setup_attempt.rb +35 -0
- data/lib/stripe/resources/setup_intent.rb +22 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +1792 -0
- data/lib/stripe/resources/shared_payment/issued_token.rb +291 -0
- data/lib/stripe/resources/source.rb +38 -0
- data/lib/stripe/resources/subscription.rb +167 -0
- data/lib/stripe/resources/subscription_item.rb +41 -1
- data/lib/stripe/resources/subscription_schedule.rb +198 -3
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/form.rb +264 -0
- data/lib/stripe/resources/tax/location.rb +72 -0
- data/lib/stripe/resources/tax/registration.rb +128 -0
- data/lib/stripe/resources/tax_code.rb +15 -1
- data/lib/stripe/resources/terminal/configuration.rb +16 -0
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
- data/lib/stripe/resources/transfer.rb +2 -0
- data/lib/stripe/resources/treasury/financial_account.rb +2 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +30 -0
- data/lib/stripe/resources/treasury/received_credit.rb +30 -0
- data/lib/stripe/resources/treasury/received_debit.rb +32 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +91 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +710 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +327 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +316 -0
- data/lib/stripe/resources/v2/billing/profile.rb +47 -0
- data/lib/stripe/resources/v2/core/account.rb +597 -3
- data/lib/stripe/resources/v2/core/batch_job.rb +488 -0
- data/lib/stripe/resources/v2/core/event_notification.rb +1 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +136 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +105 -0
- data/lib/stripe/resources/v2/data/reporting/query_run.rb +142 -0
- data/lib/stripe/resources/v2/extend/workflow.rb +80 -0
- data/lib/stripe/resources/v2/extend/workflow_run.rb +158 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +29 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +31 -0
- data/lib/stripe/resources/v2/iam/activity_log.rb +187 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +67 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +140 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +160 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +181 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +219 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +144 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +196 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +145 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +83 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +230 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +135 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -0
- data/lib/stripe/resources/v2/network/business_profile.rb +84 -0
- data/lib/stripe/resources/v2/orchestrated_commerce/agreement.rb +93 -0
- data/lib/stripe/resources.rb +417 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/account_service.rb +15 -0
- data/lib/stripe/services/billing/analytics/meter_usage_service.rb +21 -0
- data/lib/stripe/services/billing/analytics_service.rb +15 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/coupon_service.rb +14 -0
- data/lib/stripe/services/customer_service.rb +15 -0
- data/lib/stripe/services/external_account_service.rb +68 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +3 -1
- data/lib/stripe/services/financial_connections/authorization_service.rb +19 -0
- data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +3 -1
- data/lib/stripe/services/fx_quote_service.rb +27 -0
- data/lib/stripe/services/invoice_service.rb +11 -0
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/mandate_service.rb +5 -0
- data/lib/stripe/services/margin_service.rb +50 -0
- data/lib/stripe/services/order_service.rb +53 -0
- data/lib/stripe/services/payment_intent_service.rb +37 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +104 -0
- data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +19 -0
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/product_catalog/trial_offer_service.rb +19 -0
- data/lib/stripe/services/product_catalog_service.rb +13 -0
- data/lib/stripe/services/promotion_code_service.rb +29 -0
- data/lib/stripe/services/quote_line_service.rb +17 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +49 -1
- data/lib/stripe/services/reserve/hold_service.rb +30 -0
- data/lib/stripe/services/reserve/plan_service.rb +19 -0
- data/lib/stripe/services/reserve/release_service.rb +30 -0
- data/lib/stripe/services/reserve_service.rb +15 -0
- data/lib/stripe/services/shared_payment/granted_token_service.rb +19 -0
- data/lib/stripe/services/shared_payment/issued_token_service.rb +41 -0
- data/lib/stripe/services/shared_payment_service.rb +14 -0
- data/lib/stripe/services/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/subscription_service.rb +56 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax/location_service.rb +45 -0
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +32 -0
- data/lib/stripe/services/test_helpers/shared_payment_service.rb +15 -0
- data/lib/stripe/services/test_helpers_service.rb +2 -1
- data/lib/stripe/services/v1_services.rb +11 -1
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +61 -0
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/cadence_service.rb +65 -0
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +69 -0
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
- data/lib/stripe/services/v2/billing_service.rb +5 -1
- data/lib/stripe/services/v2/core/batch_job_service.rb +43 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +85 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +101 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +3 -1
- data/lib/stripe/services/v2/data/reporting/query_run_service.rb +35 -0
- data/lib/stripe/services/v2/data/reporting_service.rb +17 -0
- data/lib/stripe/services/v2/data_service.rb +15 -0
- data/lib/stripe/services/v2/extend/workflow_run_service.rb +32 -0
- data/lib/stripe/services/v2/extend/workflow_service.rb +45 -0
- data/lib/stripe/services/v2/extend_service.rb +16 -0
- data/lib/stripe/services/v2/iam/activity_log_service.rb +32 -0
- data/lib/stripe/services/v2/iam_service.rb +15 -0
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +46 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +45 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +34 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +62 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +75 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +60 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +66 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +23 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +32 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/network/business_profile_service.rb +32 -0
- data/lib/stripe/services/v2/network_service.rb +15 -0
- data/lib/stripe/services/v2/orchestrated_commerce/agreement_service.rb +65 -0
- data/lib/stripe/services/v2/orchestrated_commerce_service.rb +15 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +36 -0
- data/lib/stripe/services/v2_services.rb +8 -1
- data/lib/stripe/services.rb +209 -0
- data/lib/stripe/stripe_client.rb +8 -1
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_event_notification_handler.rb +582 -0
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +54 -0
- data/rbi/stripe/resources/v2/core/event_notification.rbi +3 -0
- data/rbi/stripe/stripe_client.rbi +13 -0
- data/rbi/stripe.rbi +124159 -57389
- metadata +378 -3
|
@@ -27,6 +27,38 @@ module Stripe
|
|
|
27
27
|
@field_remappings = {}
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
|
+
|
|
31
|
+
class CurrentTrial < ::Stripe::StripeObject
|
|
32
|
+
# Attribute for field end_date
|
|
33
|
+
attr_reader :end_date
|
|
34
|
+
# Attribute for field start_date
|
|
35
|
+
attr_reader :start_date
|
|
36
|
+
# Attribute for field trial_offer
|
|
37
|
+
attr_reader :trial_offer
|
|
38
|
+
|
|
39
|
+
def self.inner_class_types
|
|
40
|
+
@inner_class_types = {}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.field_remappings
|
|
44
|
+
@field_remappings = {}
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
class Trial < ::Stripe::StripeObject
|
|
49
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
|
50
|
+
attr_reader :converts_to
|
|
51
|
+
# Determines the type of trial for this item.
|
|
52
|
+
attr_reader :type
|
|
53
|
+
|
|
54
|
+
def self.inner_class_types
|
|
55
|
+
@inner_class_types = {}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def self.field_remappings
|
|
59
|
+
@field_remappings = {}
|
|
60
|
+
end
|
|
61
|
+
end
|
|
30
62
|
# The time period the subscription item has been billed for.
|
|
31
63
|
attr_reader :billed_until
|
|
32
64
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
|
@@ -37,6 +69,8 @@ module Stripe
|
|
|
37
69
|
attr_reader :current_period_end
|
|
38
70
|
# The start time of this subscription item's current billing period.
|
|
39
71
|
attr_reader :current_period_start
|
|
72
|
+
# The current trial that is applied to this subscription item.
|
|
73
|
+
attr_reader :current_trial
|
|
40
74
|
# Always true for a deleted object
|
|
41
75
|
attr_reader :deleted
|
|
42
76
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
|
@@ -69,6 +103,8 @@ module Stripe
|
|
|
69
103
|
attr_reader :subscription
|
|
70
104
|
# 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`.
|
|
71
105
|
attr_reader :tax_rates
|
|
106
|
+
# Options that configure the trial on the subscription item.
|
|
107
|
+
attr_reader :trial
|
|
72
108
|
|
|
73
109
|
# Adds a new item to an existing subscription. No existing items will be changed or replaced.
|
|
74
110
|
def self.create(params = {}, opts = {})
|
|
@@ -121,7 +157,11 @@ module Stripe
|
|
|
121
157
|
end
|
|
122
158
|
|
|
123
159
|
def self.inner_class_types
|
|
124
|
-
@inner_class_types = {
|
|
160
|
+
@inner_class_types = {
|
|
161
|
+
billing_thresholds: BillingThresholds,
|
|
162
|
+
current_trial: CurrentTrial,
|
|
163
|
+
trial: Trial,
|
|
164
|
+
}
|
|
125
165
|
end
|
|
126
166
|
|
|
127
167
|
def self.field_remappings
|
|
@@ -186,18 +186,65 @@ module Stripe
|
|
|
186
186
|
end
|
|
187
187
|
end
|
|
188
188
|
|
|
189
|
+
class LastPriceMigrationError < ::Stripe::StripeObject
|
|
190
|
+
class FailedTransition < ::Stripe::StripeObject
|
|
191
|
+
# The original price to be migrated.
|
|
192
|
+
attr_reader :source_price
|
|
193
|
+
# The intended resulting price of the migration.
|
|
194
|
+
attr_reader :target_price
|
|
195
|
+
|
|
196
|
+
def self.inner_class_types
|
|
197
|
+
@inner_class_types = {}
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def self.field_remappings
|
|
201
|
+
@field_remappings = {}
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
# The time at which the price migration encountered an error.
|
|
205
|
+
attr_reader :errored_at
|
|
206
|
+
# The involved price pairs in each failed transition.
|
|
207
|
+
attr_reader :failed_transitions
|
|
208
|
+
# The type of error encountered by the price migration.
|
|
209
|
+
attr_reader :type
|
|
210
|
+
|
|
211
|
+
def self.inner_class_types
|
|
212
|
+
@inner_class_types = { failed_transitions: FailedTransition }
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def self.field_remappings
|
|
216
|
+
@field_remappings = {}
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
189
220
|
class Phase < ::Stripe::StripeObject
|
|
190
221
|
class AddInvoiceItem < ::Stripe::StripeObject
|
|
191
222
|
class Discount < ::Stripe::StripeObject
|
|
223
|
+
class DiscountEnd < ::Stripe::StripeObject
|
|
224
|
+
# The discount end timestamp.
|
|
225
|
+
attr_reader :timestamp
|
|
226
|
+
# The discount end type.
|
|
227
|
+
attr_reader :type
|
|
228
|
+
|
|
229
|
+
def self.inner_class_types
|
|
230
|
+
@inner_class_types = {}
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def self.field_remappings
|
|
234
|
+
@field_remappings = {}
|
|
235
|
+
end
|
|
236
|
+
end
|
|
192
237
|
# ID of the coupon to create a new discount for.
|
|
193
238
|
attr_reader :coupon
|
|
194
239
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
195
240
|
attr_reader :discount
|
|
241
|
+
# Details to determine how long the discount should be applied for.
|
|
242
|
+
attr_reader :discount_end
|
|
196
243
|
# ID of the promotion code to create a new discount for.
|
|
197
244
|
attr_reader :promotion_code
|
|
198
245
|
|
|
199
246
|
def self.inner_class_types
|
|
200
|
-
@inner_class_types = {}
|
|
247
|
+
@inner_class_types = { discount_end: DiscountEnd }
|
|
201
248
|
end
|
|
202
249
|
|
|
203
250
|
def self.field_remappings
|
|
@@ -319,15 +366,31 @@ module Stripe
|
|
|
319
366
|
end
|
|
320
367
|
|
|
321
368
|
class Discount < ::Stripe::StripeObject
|
|
369
|
+
class DiscountEnd < ::Stripe::StripeObject
|
|
370
|
+
# The discount end timestamp.
|
|
371
|
+
attr_reader :timestamp
|
|
372
|
+
# The discount end type.
|
|
373
|
+
attr_reader :type
|
|
374
|
+
|
|
375
|
+
def self.inner_class_types
|
|
376
|
+
@inner_class_types = {}
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
def self.field_remappings
|
|
380
|
+
@field_remappings = {}
|
|
381
|
+
end
|
|
382
|
+
end
|
|
322
383
|
# ID of the coupon to create a new discount for.
|
|
323
384
|
attr_reader :coupon
|
|
324
385
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
325
386
|
attr_reader :discount
|
|
387
|
+
# Details to determine how long the discount should be applied for.
|
|
388
|
+
attr_reader :discount_end
|
|
326
389
|
# ID of the promotion code to create a new discount for.
|
|
327
390
|
attr_reader :promotion_code
|
|
328
391
|
|
|
329
392
|
def self.inner_class_types
|
|
330
|
-
@inner_class_types = {}
|
|
393
|
+
@inner_class_types = { discount_end: DiscountEnd }
|
|
331
394
|
end
|
|
332
395
|
|
|
333
396
|
def self.field_remappings
|
|
@@ -381,13 +444,44 @@ module Stripe
|
|
|
381
444
|
end
|
|
382
445
|
|
|
383
446
|
class Discount < ::Stripe::StripeObject
|
|
447
|
+
class DiscountEnd < ::Stripe::StripeObject
|
|
448
|
+
# The discount end timestamp.
|
|
449
|
+
attr_reader :timestamp
|
|
450
|
+
# The discount end type.
|
|
451
|
+
attr_reader :type
|
|
452
|
+
|
|
453
|
+
def self.inner_class_types
|
|
454
|
+
@inner_class_types = {}
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
def self.field_remappings
|
|
458
|
+
@field_remappings = {}
|
|
459
|
+
end
|
|
460
|
+
end
|
|
384
461
|
# ID of the coupon to create a new discount for.
|
|
385
462
|
attr_reader :coupon
|
|
386
463
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
387
464
|
attr_reader :discount
|
|
465
|
+
# Details to determine how long the discount should be applied for.
|
|
466
|
+
attr_reader :discount_end
|
|
388
467
|
# ID of the promotion code to create a new discount for.
|
|
389
468
|
attr_reader :promotion_code
|
|
390
469
|
|
|
470
|
+
def self.inner_class_types
|
|
471
|
+
@inner_class_types = { discount_end: DiscountEnd }
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
def self.field_remappings
|
|
475
|
+
@field_remappings = {}
|
|
476
|
+
end
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
class Trial < ::Stripe::StripeObject
|
|
480
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
|
481
|
+
attr_reader :converts_to
|
|
482
|
+
# Determines the type of trial for this item.
|
|
483
|
+
attr_reader :type
|
|
484
|
+
|
|
391
485
|
def self.inner_class_types
|
|
392
486
|
@inner_class_types = {}
|
|
393
487
|
end
|
|
@@ -410,9 +504,30 @@ module Stripe
|
|
|
410
504
|
attr_reader :quantity
|
|
411
505
|
# 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`.
|
|
412
506
|
attr_reader :tax_rates
|
|
507
|
+
# Options that configure the trial on the subscription item.
|
|
508
|
+
attr_reader :trial
|
|
509
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
510
|
+
attr_reader :trial_offer
|
|
413
511
|
|
|
414
512
|
def self.inner_class_types
|
|
415
|
-
@inner_class_types = {
|
|
513
|
+
@inner_class_types = {
|
|
514
|
+
billing_thresholds: BillingThresholds,
|
|
515
|
+
discounts: Discount,
|
|
516
|
+
trial: Trial,
|
|
517
|
+
}
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
def self.field_remappings
|
|
521
|
+
@field_remappings = {}
|
|
522
|
+
end
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
class PauseCollection < ::Stripe::StripeObject
|
|
526
|
+
# The payment collection behavior for this subscription while paused.
|
|
527
|
+
attr_reader :behavior
|
|
528
|
+
|
|
529
|
+
def self.inner_class_types
|
|
530
|
+
@inner_class_types = {}
|
|
416
531
|
end
|
|
417
532
|
|
|
418
533
|
def self.field_remappings
|
|
@@ -434,6 +549,31 @@ module Stripe
|
|
|
434
549
|
@field_remappings = {}
|
|
435
550
|
end
|
|
436
551
|
end
|
|
552
|
+
|
|
553
|
+
class TrialSettings < ::Stripe::StripeObject
|
|
554
|
+
class EndBehavior < ::Stripe::StripeObject
|
|
555
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
556
|
+
attr_reader :prorate_up_front
|
|
557
|
+
|
|
558
|
+
def self.inner_class_types
|
|
559
|
+
@inner_class_types = {}
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
def self.field_remappings
|
|
563
|
+
@field_remappings = {}
|
|
564
|
+
end
|
|
565
|
+
end
|
|
566
|
+
# Defines how the subscription should behave when a trial ends.
|
|
567
|
+
attr_reader :end_behavior
|
|
568
|
+
|
|
569
|
+
def self.inner_class_types
|
|
570
|
+
@inner_class_types = { end_behavior: EndBehavior }
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
def self.field_remappings
|
|
574
|
+
@field_remappings = {}
|
|
575
|
+
end
|
|
576
|
+
end
|
|
437
577
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
|
438
578
|
attr_reader :add_invoice_items
|
|
439
579
|
# 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.
|
|
@@ -466,14 +606,20 @@ module Stripe
|
|
|
466
606
|
attr_reader :metadata
|
|
467
607
|
# 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.
|
|
468
608
|
attr_reader :on_behalf_of
|
|
609
|
+
# 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
610
|
+
attr_reader :pause_collection
|
|
469
611
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
|
470
612
|
attr_reader :proration_behavior
|
|
471
613
|
# The start of this phase of the subscription schedule.
|
|
472
614
|
attr_reader :start_date
|
|
473
615
|
# 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.
|
|
474
616
|
attr_reader :transfer_data
|
|
617
|
+
# Specify behavior of the trial when crossing schedule phase boundaries
|
|
618
|
+
attr_reader :trial_continuation
|
|
475
619
|
# When the trial ends within the phase.
|
|
476
620
|
attr_reader :trial_end
|
|
621
|
+
# Settings related to any trials on the subscription during this phase.
|
|
622
|
+
attr_reader :trial_settings
|
|
477
623
|
|
|
478
624
|
def self.inner_class_types
|
|
479
625
|
@inner_class_types = {
|
|
@@ -483,7 +629,9 @@ module Stripe
|
|
|
483
629
|
discounts: Discount,
|
|
484
630
|
invoice_settings: InvoiceSettings,
|
|
485
631
|
items: Item,
|
|
632
|
+
pause_collection: PauseCollection,
|
|
486
633
|
transfer_data: TransferData,
|
|
634
|
+
trial_settings: TrialSettings,
|
|
487
635
|
}
|
|
488
636
|
end
|
|
489
637
|
|
|
@@ -491,8 +639,29 @@ module Stripe
|
|
|
491
639
|
@field_remappings = {}
|
|
492
640
|
end
|
|
493
641
|
end
|
|
642
|
+
|
|
643
|
+
class Prebilling < ::Stripe::StripeObject
|
|
644
|
+
# ID of the prebilling invoice.
|
|
645
|
+
attr_reader :invoice
|
|
646
|
+
# The end of the last period for which the invoice pre-bills.
|
|
647
|
+
attr_reader :period_end
|
|
648
|
+
# The start of the first period for which the invoice pre-bills.
|
|
649
|
+
attr_reader :period_start
|
|
650
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
|
651
|
+
attr_reader :update_behavior
|
|
652
|
+
|
|
653
|
+
def self.inner_class_types
|
|
654
|
+
@inner_class_types = {}
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
def self.field_remappings
|
|
658
|
+
@field_remappings = {}
|
|
659
|
+
end
|
|
660
|
+
end
|
|
494
661
|
# ID of the Connect Application that created the schedule.
|
|
495
662
|
attr_reader :application
|
|
663
|
+
# 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.
|
|
664
|
+
attr_reader :billing_behavior
|
|
496
665
|
# The billing mode of the subscription.
|
|
497
666
|
attr_reader :billing_mode
|
|
498
667
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
|
@@ -513,6 +682,8 @@ module Stripe
|
|
|
513
682
|
attr_reader :end_behavior
|
|
514
683
|
# Unique identifier for the object.
|
|
515
684
|
attr_reader :id
|
|
685
|
+
# Details of the most recent price migration that failed for the subscription schedule.
|
|
686
|
+
attr_reader :last_price_migration_error
|
|
516
687
|
# If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
|
517
688
|
attr_reader :livemode
|
|
518
689
|
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
@@ -521,6 +692,8 @@ module Stripe
|
|
|
521
692
|
attr_reader :object
|
|
522
693
|
# Configuration for the subscription schedule's phases.
|
|
523
694
|
attr_reader :phases
|
|
695
|
+
# Time period and invoice for a Subscription billed in advance.
|
|
696
|
+
attr_reader :prebilling
|
|
524
697
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
|
525
698
|
attr_reader :released_at
|
|
526
699
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
|
@@ -532,6 +705,26 @@ module Stripe
|
|
|
532
705
|
# ID of the test clock this subscription schedule belongs to.
|
|
533
706
|
attr_reader :test_clock
|
|
534
707
|
|
|
708
|
+
# Amends an existing subscription schedule.
|
|
709
|
+
def amend(params = {}, opts = {})
|
|
710
|
+
request_stripe_object(
|
|
711
|
+
method: :post,
|
|
712
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
|
713
|
+
params: params,
|
|
714
|
+
opts: opts
|
|
715
|
+
)
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
# Amends an existing subscription schedule.
|
|
719
|
+
def self.amend(schedule, params = {}, opts = {})
|
|
720
|
+
request_stripe_object(
|
|
721
|
+
method: :post,
|
|
722
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
|
723
|
+
params: params,
|
|
724
|
+
opts: opts
|
|
725
|
+
)
|
|
726
|
+
end
|
|
727
|
+
|
|
535
728
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
|
536
729
|
def cancel(params = {}, opts = {})
|
|
537
730
|
request_stripe_object(
|
|
@@ -607,7 +800,9 @@ module Stripe
|
|
|
607
800
|
billing_mode: BillingMode,
|
|
608
801
|
current_phase: CurrentPhase,
|
|
609
802
|
default_settings: DefaultSettings,
|
|
803
|
+
last_price_migration_error: LastPriceMigrationError,
|
|
610
804
|
phases: Phase,
|
|
805
|
+
prebilling: Prebilling,
|
|
611
806
|
}
|
|
612
807
|
end
|
|
613
808
|
|
|
@@ -78,6 +78,8 @@ module Stripe
|
|
|
78
78
|
attr_reader :metadata
|
|
79
79
|
# String representing the object's type. Objects of the same type share the same value.
|
|
80
80
|
attr_reader :object
|
|
81
|
+
# Indicates the line item represents a performance where the venue location might determine the tax, not the customer address. Leave empty if the tax code doesn't require a tax location. If you provide this value for tax codes with an `optional` location requirement, it overrides the customer address.
|
|
82
|
+
attr_reader :performance_location
|
|
81
83
|
# The ID of an existing [Product](https://docs.stripe.com/api/products/object).
|
|
82
84
|
attr_reader :product
|
|
83
85
|
# The number of units of the item being purchased. For reversals, this is the quantity reversed.
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Tax
|
|
6
|
+
# Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
|
|
7
|
+
#
|
|
8
|
+
# Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
|
|
9
|
+
class Form < APIResource
|
|
10
|
+
extend Stripe::APIOperations::List
|
|
11
|
+
|
|
12
|
+
OBJECT_NAME = "tax.form"
|
|
13
|
+
def self.object_name
|
|
14
|
+
"tax.form"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class AuSerr < ::Stripe::StripeObject
|
|
18
|
+
# End date of the period represented by the information reported on the tax form.
|
|
19
|
+
attr_reader :reporting_period_end_date
|
|
20
|
+
# Start date of the period represented by the information reported on the tax form.
|
|
21
|
+
attr_reader :reporting_period_start_date
|
|
22
|
+
|
|
23
|
+
def self.inner_class_types
|
|
24
|
+
@inner_class_types = {}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.field_remappings
|
|
28
|
+
@field_remappings = {}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class CaMrdp < ::Stripe::StripeObject
|
|
33
|
+
# End date of the period represented by the information reported on the tax form.
|
|
34
|
+
attr_reader :reporting_period_end_date
|
|
35
|
+
# Start date of the period represented by the information reported on the tax form.
|
|
36
|
+
attr_reader :reporting_period_start_date
|
|
37
|
+
|
|
38
|
+
def self.inner_class_types
|
|
39
|
+
@inner_class_types = {}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.field_remappings
|
|
43
|
+
@field_remappings = {}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
class EuDac7 < ::Stripe::StripeObject
|
|
48
|
+
# End date of the period represented by the information reported on the tax form.
|
|
49
|
+
attr_reader :reporting_period_end_date
|
|
50
|
+
# Start date of the period represented by the information reported on the tax form.
|
|
51
|
+
attr_reader :reporting_period_start_date
|
|
52
|
+
|
|
53
|
+
def self.inner_class_types
|
|
54
|
+
@inner_class_types = {}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def self.field_remappings
|
|
58
|
+
@field_remappings = {}
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
class FilingStatus < ::Stripe::StripeObject
|
|
63
|
+
class Jurisdiction < ::Stripe::StripeObject
|
|
64
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
65
|
+
attr_reader :country
|
|
66
|
+
# Indicates the level of the jurisdiction where the form was filed.
|
|
67
|
+
attr_reader :level
|
|
68
|
+
# [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. Null for non-U.S. forms.
|
|
69
|
+
attr_reader :state
|
|
70
|
+
|
|
71
|
+
def self.inner_class_types
|
|
72
|
+
@inner_class_types = {}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def self.field_remappings
|
|
76
|
+
@field_remappings = {}
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
# Time when the filing status was updated.
|
|
80
|
+
attr_reader :effective_at
|
|
81
|
+
# Attribute for field jurisdiction
|
|
82
|
+
attr_reader :jurisdiction
|
|
83
|
+
# The current status of the filed form.
|
|
84
|
+
attr_reader :value
|
|
85
|
+
|
|
86
|
+
def self.inner_class_types
|
|
87
|
+
@inner_class_types = { jurisdiction: Jurisdiction }
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def self.field_remappings
|
|
91
|
+
@field_remappings = {}
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
class GbMrdp < ::Stripe::StripeObject
|
|
96
|
+
# End date of the period represented by the information reported on the tax form.
|
|
97
|
+
attr_reader :reporting_period_end_date
|
|
98
|
+
# Start date of the period represented by the information reported on the tax form.
|
|
99
|
+
attr_reader :reporting_period_start_date
|
|
100
|
+
|
|
101
|
+
def self.inner_class_types
|
|
102
|
+
@inner_class_types = {}
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def self.field_remappings
|
|
106
|
+
@field_remappings = {}
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
class NzMrdp < ::Stripe::StripeObject
|
|
111
|
+
# End date of the period represented by the information reported on the tax form.
|
|
112
|
+
attr_reader :reporting_period_end_date
|
|
113
|
+
# Start date of the period represented by the information reported on the tax form.
|
|
114
|
+
attr_reader :reporting_period_start_date
|
|
115
|
+
|
|
116
|
+
def self.inner_class_types
|
|
117
|
+
@inner_class_types = {}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def self.field_remappings
|
|
121
|
+
@field_remappings = {}
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
class Payee < ::Stripe::StripeObject
|
|
126
|
+
# The ID of the payee's Stripe account.
|
|
127
|
+
attr_reader :account
|
|
128
|
+
# The external reference to this payee.
|
|
129
|
+
attr_reader :external_reference
|
|
130
|
+
# Either `account` or `external_reference`.
|
|
131
|
+
attr_reader :type
|
|
132
|
+
|
|
133
|
+
def self.inner_class_types
|
|
134
|
+
@inner_class_types = {}
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def self.field_remappings
|
|
138
|
+
@field_remappings = {}
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
class Us1099K < ::Stripe::StripeObject
|
|
143
|
+
# Year represented by the information reported on the tax form.
|
|
144
|
+
attr_reader :reporting_year
|
|
145
|
+
|
|
146
|
+
def self.inner_class_types
|
|
147
|
+
@inner_class_types = {}
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def self.field_remappings
|
|
151
|
+
@field_remappings = {}
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
class Us1099Misc < ::Stripe::StripeObject
|
|
156
|
+
# Year represented by the information reported on the tax form.
|
|
157
|
+
attr_reader :reporting_year
|
|
158
|
+
|
|
159
|
+
def self.inner_class_types
|
|
160
|
+
@inner_class_types = {}
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def self.field_remappings
|
|
164
|
+
@field_remappings = {}
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
class Us1099Nec < ::Stripe::StripeObject
|
|
169
|
+
# Year represented by the information reported on the tax form.
|
|
170
|
+
attr_reader :reporting_year
|
|
171
|
+
|
|
172
|
+
def self.inner_class_types
|
|
173
|
+
@inner_class_types = {}
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def self.field_remappings
|
|
177
|
+
@field_remappings = {}
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
# Attribute for field au_serr
|
|
181
|
+
attr_reader :au_serr
|
|
182
|
+
# Attribute for field ca_mrdp
|
|
183
|
+
attr_reader :ca_mrdp
|
|
184
|
+
# The form that corrects this form, if any.
|
|
185
|
+
attr_reader :corrected_by
|
|
186
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
187
|
+
attr_reader :created
|
|
188
|
+
# Attribute for field eu_dac7
|
|
189
|
+
attr_reader :eu_dac7
|
|
190
|
+
# 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.
|
|
191
|
+
attr_reader :filing_statuses
|
|
192
|
+
# Attribute for field gb_mrdp
|
|
193
|
+
attr_reader :gb_mrdp
|
|
194
|
+
# Unique identifier for the object.
|
|
195
|
+
attr_reader :id
|
|
196
|
+
# If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
|
197
|
+
attr_reader :livemode
|
|
198
|
+
# Attribute for field nz_mrdp
|
|
199
|
+
attr_reader :nz_mrdp
|
|
200
|
+
# String representing the object's type. Objects of the same type share the same value.
|
|
201
|
+
attr_reader :object
|
|
202
|
+
# Attribute for field payee
|
|
203
|
+
attr_reader :payee
|
|
204
|
+
# 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.
|
|
205
|
+
attr_reader :type
|
|
206
|
+
# Attribute for field us_1099_k
|
|
207
|
+
attr_reader :us_1099_k
|
|
208
|
+
# Attribute for field us_1099_misc
|
|
209
|
+
attr_reader :us_1099_misc
|
|
210
|
+
# Attribute for field us_1099_nec
|
|
211
|
+
attr_reader :us_1099_nec
|
|
212
|
+
|
|
213
|
+
# 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.
|
|
214
|
+
def self.list(params = {}, opts = {})
|
|
215
|
+
request_stripe_object(method: :get, path: "/v1/tax/forms", params: params, opts: opts)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Download the PDF for a tax form.
|
|
219
|
+
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
|
220
|
+
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
|
221
|
+
request_stream(
|
|
222
|
+
method: :get,
|
|
223
|
+
path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }),
|
|
224
|
+
params: params,
|
|
225
|
+
opts: opts,
|
|
226
|
+
base_address: :files,
|
|
227
|
+
&read_body_chunk_block
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Download the PDF for a tax form.
|
|
232
|
+
def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
|
|
233
|
+
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
|
234
|
+
execute_resource_request_stream(
|
|
235
|
+
:get,
|
|
236
|
+
format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
|
|
237
|
+
:files,
|
|
238
|
+
params,
|
|
239
|
+
opts,
|
|
240
|
+
&read_body_chunk_block
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
def self.inner_class_types
|
|
245
|
+
@inner_class_types = {
|
|
246
|
+
au_serr: AuSerr,
|
|
247
|
+
ca_mrdp: CaMrdp,
|
|
248
|
+
eu_dac7: EuDac7,
|
|
249
|
+
filing_statuses: FilingStatus,
|
|
250
|
+
gb_mrdp: GbMrdp,
|
|
251
|
+
nz_mrdp: NzMrdp,
|
|
252
|
+
payee: Payee,
|
|
253
|
+
us_1099_k: Us1099K,
|
|
254
|
+
us_1099_misc: Us1099Misc,
|
|
255
|
+
us_1099_nec: Us1099Nec,
|
|
256
|
+
}
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def self.field_remappings
|
|
260
|
+
@field_remappings = {}
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|