stripe 5.55.0 → 13.5.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/CHANGELOG.md +567 -4
- data/Gemfile +12 -4
- data/Makefile +18 -3
- data/OPENAPI_VERSION +1 -0
- data/README.md +93 -21
- data/Rakefile +3 -6
- data/VERSION +1 -1
- data/examples/README.md +16 -0
- data/examples/example_template.rb +36 -0
- data/examples/meter_event_stream.rb +57 -0
- data/examples/thinevent_webhook_handler.rb +39 -0
- data/{bin → exe}/stripe-console +1 -1
- data/justfile +43 -0
- data/lib/data/ca-certificates.crt +1241 -1937
- data/lib/stripe/api_operations/create.rb +6 -2
- data/lib/stripe/api_operations/delete.rb +12 -7
- data/lib/stripe/api_operations/list.rb +6 -9
- data/lib/stripe/api_operations/nested_resource.rb +63 -35
- data/lib/stripe/api_operations/request.rb +29 -65
- data/lib/stripe/api_operations/save.rb +20 -10
- data/lib/stripe/api_operations/search.rb +11 -9
- data/lib/stripe/api_operations/singleton_save.rb +90 -0
- data/lib/stripe/api_requestor.rb +1131 -0
- data/lib/stripe/api_resource.rb +48 -18
- data/lib/stripe/api_resource_test_helpers.rb +9 -3
- data/lib/stripe/api_version.rb +8 -0
- data/lib/stripe/connection_manager.rb +5 -7
- data/lib/stripe/errors.rb +11 -13
- data/lib/stripe/event_types.rb +14 -0
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +23 -0
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +13 -0
- data/lib/stripe/instrumentation.rb +37 -15
- data/lib/stripe/list_object.rb +5 -3
- data/lib/stripe/multipart_encoder.rb +7 -7
- data/lib/stripe/oauth.rb +14 -21
- data/lib/stripe/object_types.rb +151 -103
- data/lib/stripe/request_options.rb +129 -0
- data/lib/stripe/resources/account.rb +129 -25
- data/lib/stripe/resources/account_link.rb +12 -0
- data/lib/stripe/resources/account_session.rb +25 -0
- data/lib/stripe/resources/alipay_account.rb +1 -1
- data/lib/stripe/resources/apple_pay_domain.rb +38 -0
- data/lib/stripe/resources/application_fee.rb +9 -2
- data/lib/stripe/resources/application_fee_refund.rb +9 -2
- data/lib/stripe/resources/apps/secret.rb +55 -0
- data/lib/stripe/resources/balance.rb +14 -0
- data/lib/stripe/resources/balance_transaction.rb +19 -0
- data/lib/stripe/resources/bank_account.rb +53 -4
- data/lib/stripe/resources/billing/alert.rb +87 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +14 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +26 -0
- data/lib/stripe/resources/billing/credit_grant.rb +90 -0
- data/lib/stripe/resources/billing/meter.rb +85 -0
- data/lib/stripe/resources/billing/meter_event.rb +26 -0
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +26 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +17 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +34 -0
- data/lib/stripe/resources/billing_portal/session.rb +27 -0
- data/lib/stripe/resources/capability.rb +7 -2
- data/lib/stripe/resources/card.rb +34 -3
- data/lib/stripe/resources/cash_balance.rb +4 -0
- data/lib/stripe/resources/charge.rb +52 -3
- data/lib/stripe/resources/checkout/session.rb +83 -5
- data/lib/stripe/resources/climate/order.rb +67 -0
- data/lib/stripe/resources/climate/product.rb +27 -0
- data/lib/stripe/resources/climate/supplier.rb +26 -0
- data/lib/stripe/resources/confirmation_token.rb +39 -0
- data/lib/stripe/resources/country_spec.rb +14 -0
- data/lib/stripe/resources/coupon.rb +48 -0
- data/lib/stripe/resources/credit_note.rb +67 -9
- data/lib/stripe/resources/credit_note_line_item.rb +4 -0
- data/lib/stripe/resources/customer.rb +172 -28
- data/lib/stripe/resources/customer_balance_transaction.rb +9 -1
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +15 -0
- data/lib/stripe/resources/customer_session.rb +29 -0
- data/lib/stripe/resources/discount.rb +7 -0
- data/lib/stripe/resources/dispute.rb +41 -3
- data/lib/stripe/resources/entitlements/active_entitlement.rb +26 -0
- data/lib/stripe/resources/entitlements/feature.rb +49 -0
- data/lib/stripe/resources/ephemeral_key.rb +23 -0
- data/lib/stripe/resources/event.rb +38 -0
- data/lib/stripe/resources/exchange_rate.rb +34 -0
- data/lib/stripe/resources/file.rb +37 -15
- data/lib/stripe/resources/file_link.rb +26 -0
- data/lib/stripe/resources/financial_connections/account.rb +101 -6
- data/lib/stripe/resources/financial_connections/account_owner.rb +4 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +4 -0
- data/lib/stripe/resources/financial_connections/session.rb +14 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +26 -0
- data/lib/stripe/resources/forwarding/request.rb +52 -0
- data/lib/stripe/resources/funding_instructions.rb +8 -0
- data/lib/stripe/resources/identity/verification_report.rb +24 -0
- data/lib/stripe/resources/identity/verification_session.rb +117 -5
- data/lib/stripe/resources/invoice.rb +247 -20
- data/lib/stripe/resources/invoice_item.rb +54 -0
- data/lib/stripe/resources/invoice_line_item.rb +22 -1
- data/lib/stripe/resources/invoice_rendering_template.rb +65 -0
- data/lib/stripe/resources/issuing/authorization.rb +210 -5
- data/lib/stripe/resources/issuing/card.rb +128 -4
- data/lib/stripe/resources/issuing/cardholder.rb +36 -0
- data/lib/stripe/resources/issuing/dispute.rb +47 -2
- data/lib/stripe/resources/issuing/personalization_design.rb +119 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +26 -0
- data/lib/stripe/resources/issuing/token.rb +32 -0
- data/lib/stripe/resources/issuing/transaction.rb +79 -0
- data/lib/stripe/resources/line_item.rb +4 -0
- data/lib/stripe/resources/login_link.rb +4 -0
- data/lib/stripe/resources/mandate.rb +4 -0
- data/lib/stripe/resources/payment_intent.rb +238 -15
- data/lib/stripe/resources/payment_link.rb +39 -2
- data/lib/stripe/resources/payment_method.rb +78 -5
- data/lib/stripe/resources/payment_method_configuration.rb +59 -0
- data/lib/stripe/resources/payment_method_domain.rb +79 -0
- data/lib/stripe/resources/payout.rb +63 -5
- data/lib/stripe/resources/person.rb +8 -1
- data/lib/stripe/resources/plan.rb +51 -0
- data/lib/stripe/resources/price.rb +30 -1
- data/lib/stripe/resources/product.rb +55 -1
- data/lib/stripe/resources/product_feature.rb +13 -0
- data/lib/stripe/resources/promotion_code.rb +25 -0
- data/lib/stripe/resources/quote.rb +97 -39
- data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
- data/lib/stripe/resources/radar/value_list.rb +56 -0
- data/lib/stripe/resources/radar/value_list_item.rb +46 -0
- data/lib/stripe/resources/refund.rb +70 -5
- data/lib/stripe/resources/reporting/report_run.rb +31 -0
- data/lib/stripe/resources/reporting/report_type.rb +21 -1
- data/lib/stripe/resources/reversal.rb +17 -2
- data/lib/stripe/resources/review.rb +24 -3
- data/lib/stripe/resources/setup_attempt.rb +12 -0
- data/lib/stripe/resources/setup_intent.rb +113 -7
- data/lib/stripe/resources/shipping_rate.rb +25 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +17 -0
- data/lib/stripe/resources/source.rb +52 -10
- data/lib/stripe/resources/source_transaction.rb +7 -0
- data/lib/stripe/resources/subscription.rb +118 -5
- data/lib/stripe/resources/subscription_item.rb +54 -6
- data/lib/stripe/resources/subscription_schedule.rb +60 -5
- data/lib/stripe/resources/tax/calculation.rb +48 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +13 -0
- data/lib/stripe/resources/tax/registration.rb +54 -0
- data/lib/stripe/resources/tax/settings.rb +17 -0
- data/lib/stripe/resources/tax/transaction.rb +56 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +13 -0
- data/lib/stripe/resources/tax_code.rb +9 -0
- data/lib/stripe/resources/tax_id.rb +34 -12
- data/lib/stripe/resources/tax_rate.rb +26 -0
- data/lib/stripe/resources/terminal/configuration.rb +54 -0
- data/lib/stripe/resources/terminal/connection_token.rb +16 -0
- data/lib/stripe/resources/terminal/location.rb +57 -0
- data/lib/stripe/resources/terminal/reader.rb +138 -11
- data/lib/stripe/resources/test_helpers/test_clock.rb +58 -3
- data/lib/stripe/resources/token.rb +29 -0
- data/lib/stripe/resources/topup.rb +40 -3
- data/lib/stripe/resources/transfer.rb +29 -6
- data/lib/stripe/resources/treasury/credit_reversal.rb +37 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +37 -0
- data/lib/stripe/resources/treasury/financial_account.rb +109 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +15 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +130 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +152 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +152 -0
- data/lib/stripe/resources/treasury/received_credit.rb +47 -0
- data/lib/stripe/resources/treasury/received_debit.rb +47 -0
- data/lib/stripe/resources/treasury/transaction.rb +26 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +30 -0
- data/lib/stripe/resources/usage_record.rb +9 -0
- data/lib/stripe/resources/usage_record_summary.rb +4 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +16 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +15 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +15 -0
- data/lib/stripe/resources/v2/event.rb +13 -0
- data/lib/stripe/resources/v2/event_destination.rb +13 -0
- data/lib/stripe/resources/webhook_endpoint.rb +55 -0
- data/lib/stripe/resources.rb +51 -10
- data/lib/stripe/search_result_object.rb +5 -2
- data/lib/stripe/services/account_capability_service.rb +39 -0
- data/lib/stripe/services/account_external_account_service.rb +68 -0
- data/lib/stripe/services/account_link_service.rb +17 -0
- data/lib/stripe/services/account_login_link_service.rb +19 -0
- data/lib/stripe/services/account_person_service.rb +61 -0
- data/lib/stripe/services/account_service.rb +100 -0
- data/lib/stripe/services/account_session_service.rb +17 -0
- data/lib/stripe/services/apple_pay_domain_service.rb +50 -0
- data/lib/stripe/services/application_fee_refund_service.rb +60 -0
- data/lib/stripe/services/application_fee_service.rb +35 -0
- data/lib/stripe/services/apps/secret_service.rb +52 -0
- data/lib/stripe/services/apps_service.rb +13 -0
- data/lib/stripe/services/balance_service.rb +12 -0
- data/lib/stripe/services/balance_transaction_service.rb +32 -0
- data/lib/stripe/services/billing/alert_service.rb +74 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +19 -0
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +30 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +74 -0
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +19 -0
- data/lib/stripe/services/billing/meter_event_service.rb +19 -0
- data/lib/stripe/services/billing/meter_event_summary_service.rb +19 -0
- data/lib/stripe/services/billing/meter_service.rb +81 -0
- data/lib/stripe/services/billing_portal/configuration_service.rb +52 -0
- data/lib/stripe/services/billing_portal/session_service.rb +19 -0
- data/lib/stripe/services/billing_portal_service.rb +14 -0
- data/lib/stripe/services/billing_service.rb +20 -0
- data/lib/stripe/services/charge_service.rb +69 -0
- data/lib/stripe/services/checkout/session_line_item_service.rb +19 -0
- data/lib/stripe/services/checkout/session_service.rb +72 -0
- data/lib/stripe/services/checkout_service.rb +13 -0
- data/lib/stripe/services/climate/order_service.rb +68 -0
- data/lib/stripe/services/climate/product_service.rb +30 -0
- data/lib/stripe/services/climate/supplier_service.rb +30 -0
- data/lib/stripe/services/climate_service.rb +15 -0
- data/lib/stripe/services/confirmation_token_service.rb +17 -0
- data/lib/stripe/services/country_spec_service.rb +28 -0
- data/lib/stripe/services/coupon_service.rb +51 -0
- data/lib/stripe/services/credit_note_line_item_service.rb +17 -0
- data/lib/stripe/services/credit_note_preview_lines_service.rb +17 -0
- data/lib/stripe/services/credit_note_service.rb +93 -0
- data/lib/stripe/services/customer_balance_transaction_service.rb +50 -0
- data/lib/stripe/services/customer_cash_balance_service.rb +28 -0
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +28 -0
- data/lib/stripe/services/customer_funding_instructions_service.rb +19 -0
- data/lib/stripe/services/customer_payment_method_service.rb +28 -0
- data/lib/stripe/services/customer_payment_source_service.rb +76 -0
- data/lib/stripe/services/customer_service.rb +89 -0
- data/lib/stripe/services/customer_session_service.rb +17 -0
- data/lib/stripe/services/customer_tax_id_service.rb +50 -0
- data/lib/stripe/services/dispute_service.rb +48 -0
- data/lib/stripe/services/entitlements/active_entitlement_service.rb +30 -0
- data/lib/stripe/services/entitlements/feature_service.rb +52 -0
- data/lib/stripe/services/entitlements_service.rb +14 -0
- data/lib/stripe/services/ephemeral_key_service.rb +28 -0
- data/lib/stripe/services/event_service.rb +22 -0
- data/lib/stripe/services/exchange_rate_service.rb +28 -0
- data/lib/stripe/services/file_link_service.rb +38 -0
- data/lib/stripe/services/file_service.rb +35 -0
- data/lib/stripe/services/financial_connections/account_owner_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +81 -0
- data/lib/stripe/services/financial_connections/session_service.rb +30 -0
- data/lib/stripe/services/financial_connections/transaction_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +15 -0
- data/lib/stripe/services/forwarding/request_service.rb +41 -0
- data/lib/stripe/services/forwarding_service.rb +13 -0
- data/lib/stripe/services/identity/verification_report_service.rb +30 -0
- data/lib/stripe/services/identity/verification_session_service.rb +106 -0
- data/lib/stripe/services/identity_service.rb +14 -0
- data/lib/stripe/services/invoice_item_service.rb +61 -0
- data/lib/stripe/services/invoice_line_item_service.rb +31 -0
- data/lib/stripe/services/invoice_rendering_template_service.rb +50 -0
- data/lib/stripe/services/invoice_service.rb +202 -0
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +17 -0
- data/lib/stripe/services/issuing/authorization_service.rb +65 -0
- data/lib/stripe/services/issuing/card_service.rb +52 -0
- data/lib/stripe/services/issuing/cardholder_service.rb +52 -0
- data/lib/stripe/services/issuing/dispute_service.rb +63 -0
- data/lib/stripe/services/issuing/personalization_design_service.rb +52 -0
- data/lib/stripe/services/issuing/physical_bundle_service.rb +30 -0
- data/lib/stripe/services/issuing/token_service.rb +41 -0
- data/lib/stripe/services/issuing/transaction_service.rb +41 -0
- data/lib/stripe/services/issuing_service.rb +20 -0
- data/lib/stripe/services/mandate_service.rb +17 -0
- data/lib/stripe/services/oauth_service.rb +63 -0
- data/lib/stripe/services/payment_intent_service.rb +204 -0
- data/lib/stripe/services/payment_link_line_item_service.rb +17 -0
- data/lib/stripe/services/payment_link_service.rb +57 -0
- data/lib/stripe/services/payment_method_configuration_service.rb +50 -0
- data/lib/stripe/services/payment_method_domain_service.rb +66 -0
- data/lib/stripe/services/payment_method_service.rb +86 -0
- data/lib/stripe/services/payout_service.rb +66 -0
- data/lib/stripe/services/plan_service.rb +49 -0
- data/lib/stripe/services/price_service.rb +52 -0
- data/lib/stripe/services/product_feature_service.rb +50 -0
- data/lib/stripe/services/product_service.rb +70 -0
- data/lib/stripe/services/promotion_code_service.rb +50 -0
- data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +17 -0
- data/lib/stripe/services/quote_line_item_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +92 -0
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +32 -0
- data/lib/stripe/services/radar/value_list_item_service.rb +52 -0
- data/lib/stripe/services/radar/value_list_service.rb +63 -0
- data/lib/stripe/services/radar_service.rb +15 -0
- data/lib/stripe/services/refund_service.rb +63 -0
- data/lib/stripe/services/reporting/report_run_service.rb +41 -0
- data/lib/stripe/services/reporting/report_type_service.rb +30 -0
- data/lib/stripe/services/reporting_service.rb +14 -0
- data/lib/stripe/services/review_service.rb +33 -0
- data/lib/stripe/services/setup_attempt_service.rb +17 -0
- data/lib/stripe/services/setup_intent_service.rb +105 -0
- data/lib/stripe/services/shipping_rate_service.rb +50 -0
- data/lib/stripe/services/sigma/scheduled_query_run_service.rb +30 -0
- data/lib/stripe/services/sigma_service.rb +13 -0
- data/lib/stripe/services/source_service.rb +64 -0
- data/lib/stripe/services/source_transaction_service.rb +17 -0
- data/lib/stripe/services/subscription_item_service.rb +69 -0
- data/lib/stripe/services/subscription_item_usage_record_service.rb +23 -0
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +19 -0
- data/lib/stripe/services/subscription_schedule_service.rb +72 -0
- data/lib/stripe/services/subscription_service.rb +127 -0
- data/lib/stripe/services/tax/calculation_line_item_service.rb +19 -0
- data/lib/stripe/services/tax/calculation_service.rb +37 -0
- data/lib/stripe/services/tax/registration_service.rb +54 -0
- data/lib/stripe/services/tax/settings_service.rb +30 -0
- data/lib/stripe/services/tax/transaction_line_item_service.rb +19 -0
- data/lib/stripe/services/tax/transaction_service.rb +48 -0
- data/lib/stripe/services/tax_code_service.rb +22 -0
- data/lib/stripe/services/tax_id_service.rb +38 -0
- data/lib/stripe/services/tax_rate_service.rb +38 -0
- data/lib/stripe/services/tax_service.rb +16 -0
- data/lib/stripe/services/terminal/configuration_service.rb +63 -0
- data/lib/stripe/services/terminal/connection_token_service.rb +19 -0
- data/lib/stripe/services/terminal/location_service.rb +64 -0
- data/lib/stripe/services/terminal/reader_service.rb +118 -0
- data/lib/stripe/services/terminal_service.rb +16 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +19 -0
- data/lib/stripe/services/test_helpers/customer_service.rb +19 -0
- data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +87 -0
- data/lib/stripe/services/test_helpers/issuing/card_service.rb +65 -0
- data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +43 -0
- data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +43 -0
- data/lib/stripe/services/test_helpers/issuing_service.rb +19 -0
- data/lib/stripe/services/test_helpers/refund_service.rb +19 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +21 -0
- data/lib/stripe/services/test_helpers/terminal_service.rb +15 -0
- data/lib/stripe/services/test_helpers/test_clock_service.rb +63 -0
- data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +43 -0
- data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +54 -0
- data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +54 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +21 -0
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +21 -0
- data/lib/stripe/services/test_helpers/treasury_service.rb +19 -0
- data/lib/stripe/services/test_helpers_service.rb +19 -0
- data/lib/stripe/services/token_service.rb +23 -0
- data/lib/stripe/services/topup_service.rb +49 -0
- data/lib/stripe/services/transfer_reversal_service.rb +56 -0
- data/lib/stripe/services/transfer_service.rb +47 -0
- data/lib/stripe/services/treasury/credit_reversal_service.rb +41 -0
- data/lib/stripe/services/treasury/debit_reversal_service.rb +41 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +30 -0
- data/lib/stripe/services/treasury/financial_account_service.rb +70 -0
- data/lib/stripe/services/treasury/inbound_transfer_service.rb +52 -0
- data/lib/stripe/services/treasury/outbound_payment_service.rb +52 -0
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +52 -0
- data/lib/stripe/services/treasury/received_credit_service.rb +30 -0
- data/lib/stripe/services/treasury/received_debit_service.rb +30 -0
- data/lib/stripe/services/treasury/transaction_entry_service.rb +30 -0
- data/lib/stripe/services/treasury/transaction_service.rb +30 -0
- data/lib/stripe/services/treasury_service.rb +22 -0
- data/lib/stripe/services/v1_services.rb +89 -0
- data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +21 -0
- data/lib/stripe/services/v2/billing/meter_event_service.rb +21 -0
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +21 -0
- data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +23 -0
- data/lib/stripe/services/v2/billing_service.rb +18 -0
- data/lib/stripe/services/v2/core/event_destination_service.rb +98 -0
- data/lib/stripe/services/v2/core/event_service.rb +32 -0
- data/lib/stripe/services/v2/core_service.rb +16 -0
- data/lib/stripe/services/v2_services.rb +14 -0
- data/lib/stripe/services/webhook_endpoint_service.rb +61 -0
- data/lib/stripe/services.rb +182 -0
- data/lib/stripe/singleton_api_resource.rb +3 -3
- data/lib/stripe/stripe_client.rb +55 -1028
- data/lib/stripe/stripe_configuration.rb +63 -42
- data/lib/stripe/stripe_object.rb +60 -38
- data/lib/stripe/stripe_response.rb +1 -3
- data/lib/stripe/stripe_service.rb +32 -0
- data/lib/stripe/thin_event.rb +37 -0
- data/lib/stripe/util.rb +109 -45
- data/lib/stripe/v2_list_object.rb +84 -0
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +3 -2
- data/lib/stripe.rb +39 -0
- data/stripe.gemspec +7 -4
- metadata +252 -13
- data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
- data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
- data/lib/stripe/resources/issuing/card_details.rb +0 -10
- data/lib/stripe/resources/order.rb +0 -33
- data/lib/stripe/resources/order_return.rb +0 -10
- data/lib/stripe/resources/recipient.rb +0 -14
- data/lib/stripe/resources/sku.rb +0 -13
- data/lib/stripe/resources/three_d_secure.rb +0 -14
@@ -3,32 +3,237 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Issuing
|
6
|
+
# When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
|
7
|
+
# object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
|
8
|
+
# purchase to be completed successfully.
|
9
|
+
#
|
10
|
+
# Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
|
6
11
|
class Authorization < APIResource
|
12
|
+
extend Gem::Deprecate
|
7
13
|
extend Stripe::APIOperations::List
|
8
14
|
include Stripe::APIOperations::Save
|
9
15
|
|
10
16
|
OBJECT_NAME = "issuing.authorization"
|
17
|
+
def self.object_name
|
18
|
+
"issuing.authorization"
|
19
|
+
end
|
11
20
|
|
12
|
-
|
13
|
-
|
14
|
-
|
21
|
+
# [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.
|
22
|
+
# 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).
|
15
23
|
def approve(params = {}, opts = {})
|
16
24
|
request_stripe_object(
|
17
25
|
method: :post,
|
18
|
-
path:
|
26
|
+
path: format("/v1/issuing/authorizations/%<authorization>s/approve", { authorization: CGI.escape(self["id"]) }),
|
19
27
|
params: params,
|
20
28
|
opts: opts
|
21
29
|
)
|
22
30
|
end
|
23
31
|
|
32
|
+
deprecate :approve, :none, 2024, 3
|
33
|
+
# [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.
|
34
|
+
# 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).
|
35
|
+
def self.approve(authorization, params = {}, opts = {})
|
36
|
+
request_stripe_object(
|
37
|
+
method: :post,
|
38
|
+
path: format("/v1/issuing/authorizations/%<authorization>s/approve", { authorization: CGI.escape(authorization) }),
|
39
|
+
params: params,
|
40
|
+
opts: opts
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
class << self
|
45
|
+
extend Gem::Deprecate
|
46
|
+
deprecate :approve, :none, 2024, 3
|
47
|
+
end
|
48
|
+
|
49
|
+
# [Deprecated] Declines 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.
|
50
|
+
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
24
51
|
def decline(params = {}, opts = {})
|
25
52
|
request_stripe_object(
|
26
53
|
method: :post,
|
27
|
-
path:
|
54
|
+
path: format("/v1/issuing/authorizations/%<authorization>s/decline", { authorization: CGI.escape(self["id"]) }),
|
55
|
+
params: params,
|
56
|
+
opts: opts
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
deprecate :decline, :none, 2024, 3
|
61
|
+
# [Deprecated] Declines 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.
|
62
|
+
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
63
|
+
def self.decline(authorization, params = {}, opts = {})
|
64
|
+
request_stripe_object(
|
65
|
+
method: :post,
|
66
|
+
path: format("/v1/issuing/authorizations/%<authorization>s/decline", { authorization: CGI.escape(authorization) }),
|
67
|
+
params: params,
|
68
|
+
opts: opts
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
class << self
|
73
|
+
extend Gem::Deprecate
|
74
|
+
deprecate :decline, :none, 2024, 3
|
75
|
+
end
|
76
|
+
|
77
|
+
# 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.
|
78
|
+
def self.list(params = {}, opts = {})
|
79
|
+
request_stripe_object(
|
80
|
+
method: :get,
|
81
|
+
path: "/v1/issuing/authorizations",
|
82
|
+
params: params,
|
83
|
+
opts: opts
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
88
|
+
def self.update(authorization, params = {}, opts = {})
|
89
|
+
request_stripe_object(
|
90
|
+
method: :post,
|
91
|
+
path: format("/v1/issuing/authorizations/%<authorization>s", { authorization: CGI.escape(authorization) }),
|
28
92
|
params: params,
|
29
93
|
opts: opts
|
30
94
|
)
|
31
95
|
end
|
96
|
+
|
97
|
+
def test_helpers
|
98
|
+
TestHelpers.new(self)
|
99
|
+
end
|
100
|
+
|
101
|
+
class TestHelpers < APIResourceTestHelpers
|
102
|
+
RESOURCE_CLASS = Authorization
|
103
|
+
def self.resource_class
|
104
|
+
"Authorization"
|
105
|
+
end
|
106
|
+
|
107
|
+
# Capture a test-mode authorization.
|
108
|
+
def self.capture(authorization, params = {}, opts = {})
|
109
|
+
request_stripe_object(
|
110
|
+
method: :post,
|
111
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(authorization) }),
|
112
|
+
params: params,
|
113
|
+
opts: opts
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Capture a test-mode authorization.
|
118
|
+
def capture(params = {}, opts = {})
|
119
|
+
@resource.request_stripe_object(
|
120
|
+
method: :post,
|
121
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
|
122
|
+
params: params,
|
123
|
+
opts: opts
|
124
|
+
)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Create a test-mode authorization.
|
128
|
+
def self.create(params = {}, opts = {})
|
129
|
+
request_stripe_object(
|
130
|
+
method: :post,
|
131
|
+
path: "/v1/test_helpers/issuing/authorizations",
|
132
|
+
params: params,
|
133
|
+
opts: opts
|
134
|
+
)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Expire a test-mode Authorization.
|
138
|
+
def self.expire(authorization, params = {}, opts = {})
|
139
|
+
request_stripe_object(
|
140
|
+
method: :post,
|
141
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(authorization) }),
|
142
|
+
params: params,
|
143
|
+
opts: opts
|
144
|
+
)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Expire a test-mode Authorization.
|
148
|
+
def expire(params = {}, opts = {})
|
149
|
+
@resource.request_stripe_object(
|
150
|
+
method: :post,
|
151
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }),
|
152
|
+
params: params,
|
153
|
+
opts: opts
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
|
158
|
+
def self.finalize_amount(authorization, params = {}, opts = {})
|
159
|
+
request_stripe_object(
|
160
|
+
method: :post,
|
161
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape(authorization) }),
|
162
|
+
params: params,
|
163
|
+
opts: opts
|
164
|
+
)
|
165
|
+
end
|
166
|
+
|
167
|
+
# Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
|
168
|
+
def finalize_amount(params = {}, opts = {})
|
169
|
+
@resource.request_stripe_object(
|
170
|
+
method: :post,
|
171
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape(@resource["id"]) }),
|
172
|
+
params: params,
|
173
|
+
opts: opts
|
174
|
+
)
|
175
|
+
end
|
176
|
+
|
177
|
+
# Increment a test-mode Authorization.
|
178
|
+
def self.increment(authorization, params = {}, opts = {})
|
179
|
+
request_stripe_object(
|
180
|
+
method: :post,
|
181
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(authorization) }),
|
182
|
+
params: params,
|
183
|
+
opts: opts
|
184
|
+
)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Increment a test-mode Authorization.
|
188
|
+
def increment(params = {}, opts = {})
|
189
|
+
@resource.request_stripe_object(
|
190
|
+
method: :post,
|
191
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }),
|
192
|
+
params: params,
|
193
|
+
opts: opts
|
194
|
+
)
|
195
|
+
end
|
196
|
+
|
197
|
+
# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
|
198
|
+
def self.respond(authorization, params = {}, opts = {})
|
199
|
+
request_stripe_object(
|
200
|
+
method: :post,
|
201
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(authorization) }),
|
202
|
+
params: params,
|
203
|
+
opts: opts
|
204
|
+
)
|
205
|
+
end
|
206
|
+
|
207
|
+
# Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
|
208
|
+
def respond(params = {}, opts = {})
|
209
|
+
@resource.request_stripe_object(
|
210
|
+
method: :post,
|
211
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(@resource["id"]) }),
|
212
|
+
params: params,
|
213
|
+
opts: opts
|
214
|
+
)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Reverse a test-mode Authorization.
|
218
|
+
def self.reverse(authorization, params = {}, opts = {})
|
219
|
+
request_stripe_object(
|
220
|
+
method: :post,
|
221
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(authorization) }),
|
222
|
+
params: params,
|
223
|
+
opts: opts
|
224
|
+
)
|
225
|
+
end
|
226
|
+
|
227
|
+
# Reverse a test-mode Authorization.
|
228
|
+
def reverse(params = {}, opts = {})
|
229
|
+
@resource.request_stripe_object(
|
230
|
+
method: :post,
|
231
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(@resource["id"]) }),
|
232
|
+
params: params,
|
233
|
+
opts: opts
|
234
|
+
)
|
235
|
+
end
|
236
|
+
end
|
32
237
|
end
|
33
238
|
end
|
34
239
|
end
|
@@ -3,23 +3,147 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Issuing
|
6
|
+
# You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders.
|
6
7
|
class Card < APIResource
|
7
8
|
extend Stripe::APIOperations::Create
|
8
9
|
extend Stripe::APIOperations::List
|
9
10
|
include Stripe::APIOperations::Save
|
10
11
|
|
11
12
|
OBJECT_NAME = "issuing.card"
|
13
|
+
def self.object_name
|
14
|
+
"issuing.card"
|
15
|
+
end
|
12
16
|
|
13
|
-
|
17
|
+
# Creates an Issuing Card object.
|
18
|
+
def self.create(params = {}, opts = {})
|
19
|
+
request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts)
|
20
|
+
end
|
14
21
|
|
15
|
-
|
22
|
+
# 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.
|
23
|
+
def self.list(params = {}, opts = {})
|
24
|
+
request_stripe_object(method: :get, path: "/v1/issuing/cards", params: params, opts: opts)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
28
|
+
def self.update(card, params = {}, opts = {})
|
16
29
|
request_stripe_object(
|
17
|
-
method: :
|
18
|
-
path:
|
30
|
+
method: :post,
|
31
|
+
path: format("/v1/issuing/cards/%<card>s", { card: CGI.escape(card) }),
|
19
32
|
params: params,
|
20
33
|
opts: opts
|
21
34
|
)
|
22
35
|
end
|
36
|
+
|
37
|
+
def test_helpers
|
38
|
+
TestHelpers.new(self)
|
39
|
+
end
|
40
|
+
|
41
|
+
class TestHelpers < APIResourceTestHelpers
|
42
|
+
RESOURCE_CLASS = Card
|
43
|
+
def self.resource_class
|
44
|
+
"Card"
|
45
|
+
end
|
46
|
+
|
47
|
+
# Updates the shipping status of the specified Issuing Card object to delivered.
|
48
|
+
def self.deliver_card(card, params = {}, opts = {})
|
49
|
+
request_stripe_object(
|
50
|
+
method: :post,
|
51
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(card) }),
|
52
|
+
params: params,
|
53
|
+
opts: opts
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Updates the shipping status of the specified Issuing Card object to delivered.
|
58
|
+
def deliver_card(params = {}, opts = {})
|
59
|
+
@resource.request_stripe_object(
|
60
|
+
method: :post,
|
61
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(@resource["id"]) }),
|
62
|
+
params: params,
|
63
|
+
opts: opts
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Updates the shipping status of the specified Issuing Card object to failure.
|
68
|
+
def self.fail_card(card, params = {}, opts = {})
|
69
|
+
request_stripe_object(
|
70
|
+
method: :post,
|
71
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
|
72
|
+
params: params,
|
73
|
+
opts: opts
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Updates the shipping status of the specified Issuing Card object to failure.
|
78
|
+
def fail_card(params = {}, opts = {})
|
79
|
+
@resource.request_stripe_object(
|
80
|
+
method: :post,
|
81
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(@resource["id"]) }),
|
82
|
+
params: params,
|
83
|
+
opts: opts
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Updates the shipping status of the specified Issuing Card object to returned.
|
88
|
+
def self.return_card(card, params = {}, opts = {})
|
89
|
+
request_stripe_object(
|
90
|
+
method: :post,
|
91
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
|
92
|
+
params: params,
|
93
|
+
opts: opts
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Updates the shipping status of the specified Issuing Card object to returned.
|
98
|
+
def return_card(params = {}, opts = {})
|
99
|
+
@resource.request_stripe_object(
|
100
|
+
method: :post,
|
101
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(@resource["id"]) }),
|
102
|
+
params: params,
|
103
|
+
opts: opts
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Updates the shipping status of the specified Issuing Card object to shipped.
|
108
|
+
def self.ship_card(card, params = {}, opts = {})
|
109
|
+
request_stripe_object(
|
110
|
+
method: :post,
|
111
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
|
112
|
+
params: params,
|
113
|
+
opts: opts
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Updates the shipping status of the specified Issuing Card object to shipped.
|
118
|
+
def ship_card(params = {}, opts = {})
|
119
|
+
@resource.request_stripe_object(
|
120
|
+
method: :post,
|
121
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(@resource["id"]) }),
|
122
|
+
params: params,
|
123
|
+
opts: opts
|
124
|
+
)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
|
128
|
+
def self.submit_card(card, params = {}, opts = {})
|
129
|
+
request_stripe_object(
|
130
|
+
method: :post,
|
131
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(card) }),
|
132
|
+
params: params,
|
133
|
+
opts: opts
|
134
|
+
)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
|
138
|
+
def submit_card(params = {}, opts = {})
|
139
|
+
@resource.request_stripe_object(
|
140
|
+
method: :post,
|
141
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(@resource["id"]) }),
|
142
|
+
params: params,
|
143
|
+
opts: opts
|
144
|
+
)
|
145
|
+
end
|
146
|
+
end
|
23
147
|
end
|
24
148
|
end
|
25
149
|
end
|
@@ -3,12 +3,48 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Issuing
|
6
|
+
# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
|
7
|
+
#
|
8
|
+
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
|
6
9
|
class Cardholder < APIResource
|
7
10
|
extend Stripe::APIOperations::Create
|
8
11
|
extend Stripe::APIOperations::List
|
9
12
|
include Stripe::APIOperations::Save
|
10
13
|
|
11
14
|
OBJECT_NAME = "issuing.cardholder"
|
15
|
+
def self.object_name
|
16
|
+
"issuing.cardholder"
|
17
|
+
end
|
18
|
+
|
19
|
+
# Creates a new Issuing Cardholder object that can be issued cards.
|
20
|
+
def self.create(params = {}, opts = {})
|
21
|
+
request_stripe_object(
|
22
|
+
method: :post,
|
23
|
+
path: "/v1/issuing/cardholders",
|
24
|
+
params: params,
|
25
|
+
opts: opts
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# 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.
|
30
|
+
def self.list(params = {}, opts = {})
|
31
|
+
request_stripe_object(
|
32
|
+
method: :get,
|
33
|
+
path: "/v1/issuing/cardholders",
|
34
|
+
params: params,
|
35
|
+
opts: opts
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
40
|
+
def self.update(cardholder, params = {}, opts = {})
|
41
|
+
request_stripe_object(
|
42
|
+
method: :post,
|
43
|
+
path: format("/v1/issuing/cardholders/%<cardholder>s", { cardholder: CGI.escape(cardholder) }),
|
44
|
+
params: params,
|
45
|
+
opts: opts
|
46
|
+
)
|
47
|
+
end
|
12
48
|
end
|
13
49
|
end
|
14
50
|
end
|
@@ -3,19 +3,64 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
module Issuing
|
6
|
+
# 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.
|
7
|
+
#
|
8
|
+
# Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)
|
6
9
|
class Dispute < APIResource
|
7
10
|
extend Stripe::APIOperations::Create
|
8
11
|
extend Stripe::APIOperations::List
|
9
12
|
include Stripe::APIOperations::Save
|
10
13
|
|
11
14
|
OBJECT_NAME = "issuing.dispute"
|
15
|
+
def self.object_name
|
16
|
+
"issuing.dispute"
|
17
|
+
end
|
18
|
+
|
19
|
+
# 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.
|
20
|
+
def self.create(params = {}, opts = {})
|
21
|
+
request_stripe_object(
|
22
|
+
method: :post,
|
23
|
+
path: "/v1/issuing/disputes",
|
24
|
+
params: params,
|
25
|
+
opts: opts
|
26
|
+
)
|
27
|
+
end
|
12
28
|
|
13
|
-
|
29
|
+
# 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.
|
30
|
+
def self.list(params = {}, opts = {})
|
31
|
+
request_stripe_object(
|
32
|
+
method: :get,
|
33
|
+
path: "/v1/issuing/disputes",
|
34
|
+
params: params,
|
35
|
+
opts: opts
|
36
|
+
)
|
37
|
+
end
|
14
38
|
|
39
|
+
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
15
40
|
def submit(params = {}, opts = {})
|
16
41
|
request_stripe_object(
|
17
42
|
method: :post,
|
18
|
-
path:
|
43
|
+
path: format("/v1/issuing/disputes/%<dispute>s/submit", { dispute: CGI.escape(self["id"]) }),
|
44
|
+
params: params,
|
45
|
+
opts: opts
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
50
|
+
def self.submit(dispute, params = {}, opts = {})
|
51
|
+
request_stripe_object(
|
52
|
+
method: :post,
|
53
|
+
path: format("/v1/issuing/disputes/%<dispute>s/submit", { dispute: CGI.escape(dispute) }),
|
54
|
+
params: params,
|
55
|
+
opts: opts
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
|
60
|
+
def self.update(dispute, params = {}, opts = {})
|
61
|
+
request_stripe_object(
|
62
|
+
method: :post,
|
63
|
+
path: format("/v1/issuing/disputes/%<dispute>s", { dispute: CGI.escape(dispute) }),
|
19
64
|
params: params,
|
20
65
|
opts: opts
|
21
66
|
)
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Issuing
|
6
|
+
# A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
|
7
|
+
class PersonalizationDesign < APIResource
|
8
|
+
extend Stripe::APIOperations::Create
|
9
|
+
extend Stripe::APIOperations::List
|
10
|
+
include Stripe::APIOperations::Save
|
11
|
+
|
12
|
+
OBJECT_NAME = "issuing.personalization_design"
|
13
|
+
def self.object_name
|
14
|
+
"issuing.personalization_design"
|
15
|
+
end
|
16
|
+
|
17
|
+
# Creates a personalization design object.
|
18
|
+
def self.create(params = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :post,
|
21
|
+
path: "/v1/issuing/personalization_designs",
|
22
|
+
params: params,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# 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.
|
28
|
+
def self.list(params = {}, opts = {})
|
29
|
+
request_stripe_object(
|
30
|
+
method: :get,
|
31
|
+
path: "/v1/issuing/personalization_designs",
|
32
|
+
params: params,
|
33
|
+
opts: opts
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Updates a card personalization object.
|
38
|
+
def self.update(personalization_design, params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :post,
|
41
|
+
path: format("/v1/issuing/personalization_designs/%<personalization_design>s", { personalization_design: CGI.escape(personalization_design) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_helpers
|
48
|
+
TestHelpers.new(self)
|
49
|
+
end
|
50
|
+
|
51
|
+
class TestHelpers < APIResourceTestHelpers
|
52
|
+
RESOURCE_CLASS = PersonalizationDesign
|
53
|
+
def self.resource_class
|
54
|
+
"PersonalizationDesign"
|
55
|
+
end
|
56
|
+
|
57
|
+
# Updates the status of the specified testmode personalization design object to active.
|
58
|
+
def self.activate(personalization_design, params = {}, opts = {})
|
59
|
+
request_stripe_object(
|
60
|
+
method: :post,
|
61
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(personalization_design) }),
|
62
|
+
params: params,
|
63
|
+
opts: opts
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Updates the status of the specified testmode personalization design object to active.
|
68
|
+
def activate(params = {}, opts = {})
|
69
|
+
@resource.request_stripe_object(
|
70
|
+
method: :post,
|
71
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(@resource["id"]) }),
|
72
|
+
params: params,
|
73
|
+
opts: opts
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Updates the status of the specified testmode personalization design object to inactive.
|
78
|
+
def self.deactivate(personalization_design, params = {}, opts = {})
|
79
|
+
request_stripe_object(
|
80
|
+
method: :post,
|
81
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(personalization_design) }),
|
82
|
+
params: params,
|
83
|
+
opts: opts
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Updates the status of the specified testmode personalization design object to inactive.
|
88
|
+
def deactivate(params = {}, opts = {})
|
89
|
+
@resource.request_stripe_object(
|
90
|
+
method: :post,
|
91
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(@resource["id"]) }),
|
92
|
+
params: params,
|
93
|
+
opts: opts
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Updates the status of the specified testmode personalization design object to rejected.
|
98
|
+
def self.reject(personalization_design, params = {}, opts = {})
|
99
|
+
request_stripe_object(
|
100
|
+
method: :post,
|
101
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(personalization_design) }),
|
102
|
+
params: params,
|
103
|
+
opts: opts
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Updates the status of the specified testmode personalization design object to rejected.
|
108
|
+
def reject(params = {}, opts = {})
|
109
|
+
@resource.request_stripe_object(
|
110
|
+
method: :post,
|
111
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(@resource["id"]) }),
|
112
|
+
params: params,
|
113
|
+
opts: opts
|
114
|
+
)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Issuing
|
6
|
+
# 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.
|
7
|
+
class PhysicalBundle < APIResource
|
8
|
+
extend Stripe::APIOperations::List
|
9
|
+
|
10
|
+
OBJECT_NAME = "issuing.physical_bundle"
|
11
|
+
def self.object_name
|
12
|
+
"issuing.physical_bundle"
|
13
|
+
end
|
14
|
+
|
15
|
+
# 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.
|
16
|
+
def self.list(params = {}, opts = {})
|
17
|
+
request_stripe_object(
|
18
|
+
method: :get,
|
19
|
+
path: "/v1/issuing/physical_bundles",
|
20
|
+
params: params,
|
21
|
+
opts: opts
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|