mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-08-12 00:01:47 -04:00
Compare commits
7 Commits
1bcb4bc058
...
a7d998ab2d
Author | SHA1 | Date | |
---|---|---|---|
|
a7d998ab2d | ||
|
479d17b26a | ||
|
06d1bfbc9b | ||
|
ce8d7ca4cc | ||
|
bc375b791e | ||
|
0dc3414645 | ||
|
d22938897e |
@ -4,6 +4,12 @@
|
|||||||
* [#1321](https://github.com/stripe/stripe-ruby/pull/1321) Update generated code for beta
|
* [#1321](https://github.com/stripe/stripe-ruby/pull/1321) Update generated code for beta
|
||||||
* Release specs are identical.
|
* Release specs are identical.
|
||||||
|
|
||||||
|
## 10.8.0 - 2024-02-08
|
||||||
|
* [#1322](https://github.com/stripe/stripe-ruby/pull/1322) Update generated code
|
||||||
|
* [#1323](https://github.com/stripe/stripe-ruby/pull/1323) Extract other CRUDL api operations from mixins
|
||||||
|
* Extract more CRUDL operations, namely `create`, `delete`, `update`, and `list` into the resources. These methods will no longer rely on the APIOperation mixins.
|
||||||
|
* [#1314](https://github.com/stripe/stripe-ruby/pull/1314) Update mocha gem to 1.16
|
||||||
|
|
||||||
## 10.8.0-beta.1 - 2024-02-01
|
## 10.8.0-beta.1 - 2024-02-01
|
||||||
* [#1318](https://github.com/stripe/stripe-ruby/pull/1318) Update generated code for beta
|
* [#1318](https://github.com/stripe/stripe-ruby/pull/1318) Update generated code for beta
|
||||||
* Add support for new resources `Entitlements.Event` and `Entitlements.Feature`
|
* Add support for new resources `Entitlements.Event` and `Entitlements.Feature`
|
||||||
|
3
Gemfile
3
Gemfile
@ -31,6 +31,9 @@ group :development do
|
|||||||
# don't install on truffleruby
|
# don't install on truffleruby
|
||||||
gem "jaro_winkler", "1.5.4" unless RUBY_ENGINE == "truffleruby"
|
gem "jaro_winkler", "1.5.4" unless RUBY_ENGINE == "truffleruby"
|
||||||
|
|
||||||
|
gem "sorbet-static"
|
||||||
|
gem "tapioca"
|
||||||
|
|
||||||
platforms :mri do
|
platforms :mri do
|
||||||
gem "byebug"
|
gem "byebug"
|
||||||
gem "pry"
|
gem "pry"
|
||||||
|
7
Makefile
7
Makefile
@ -9,5 +9,12 @@ codegen-format:
|
|||||||
|
|
||||||
ci-test:
|
ci-test:
|
||||||
bundle install && bundle exec rake test
|
bundle install && bundle exec rake test
|
||||||
|
@version=$$(ruby -e "puts RUBY_VERSION.split('.')[0..1].join.to_i"); \
|
||||||
|
if [ $$version -ge 27 ]; then \
|
||||||
|
echo "Ruby version >= 2.7, continue with srb tc"; \
|
||||||
|
bundle exec srb tc; \
|
||||||
|
else \
|
||||||
|
echo "Ruby version < 2.7, skipping srb tc"; \
|
||||||
|
fi
|
||||||
|
|
||||||
test: ci-test
|
test: ci-test
|
||||||
|
@ -1 +1 @@
|
|||||||
v810
|
v827
|
27
bin/tapioca
Executable file
27
bin/tapioca
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file was generated by Bundler.
|
||||||
|
#
|
||||||
|
# The application 'tapioca' is installed as part of a gem, and
|
||||||
|
# this file is here to facilitate running it.
|
||||||
|
#
|
||||||
|
|
||||||
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
||||||
|
|
||||||
|
bundle_binstub = File.expand_path("bundle", __dir__)
|
||||||
|
|
||||||
|
if File.file?(bundle_binstub)
|
||||||
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||||
|
load(bundle_binstub)
|
||||||
|
else
|
||||||
|
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||||
|
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
require "rubygems"
|
||||||
|
require "bundler/setup"
|
||||||
|
|
||||||
|
load Gem.bin_path("tapioca", "tapioca")
|
@ -11,6 +11,15 @@ module Stripe
|
|||||||
# for example, where this is allowed.
|
# for example, where this is allowed.
|
||||||
attr_accessor :save_with_parent
|
attr_accessor :save_with_parent
|
||||||
|
|
||||||
|
# TODO: (major) Remove OBJECT_NAME and stop using const_get here
|
||||||
|
# This is a workaround to avoid breaking users who have defined their own
|
||||||
|
# APIResource subclasses with a custom OBJECT_NAME. We should never fallback
|
||||||
|
# on this case otherwise.
|
||||||
|
OBJECT_NAME = ""
|
||||||
|
def self.object_name
|
||||||
|
const_get(:OBJECT_NAME)
|
||||||
|
end
|
||||||
|
|
||||||
def self.class_name
|
def self.class_name
|
||||||
name.split("::")[-1]
|
name.split("::")[-1]
|
||||||
end
|
end
|
||||||
@ -23,7 +32,7 @@ module Stripe
|
|||||||
end
|
end
|
||||||
# Namespaces are separated in object names with periods (.) and in URLs
|
# Namespaces are separated in object names with periods (.) and in URLs
|
||||||
# with forward slashes (/), so replace the former with the latter.
|
# with forward slashes (/), so replace the former with the latter.
|
||||||
"/v1/#{self::OBJECT_NAME.downcase.tr('.', '/')}s"
|
"/v1/#{object_name.downcase.tr('.', '/')}s"
|
||||||
end
|
end
|
||||||
|
|
||||||
# A metaprogramming call that specifies that a field of a resource can be
|
# A metaprogramming call that specifies that a field of a resource can be
|
||||||
|
@ -14,6 +14,10 @@ module Stripe
|
|||||||
@resource = resource
|
@resource = resource
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.resource_class
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# Adds a custom method to a test helper. This is used to add support for
|
# Adds a custom method to a test helper. This is used to add support for
|
||||||
# non-CRUDL API requests, e.g. capturing charges. custom_method takes the
|
# non-CRUDL API requests, e.g. capturing charges. custom_method takes the
|
||||||
# following parameters:
|
# following parameters:
|
||||||
@ -27,12 +31,12 @@ module Stripe
|
|||||||
# adds a `capture` class method to the resource class that, when called,
|
# adds a `capture` class method to the resource class that, when called,
|
||||||
# will send a POST request to `/v1/<object_name>/capture`.
|
# will send a POST request to `/v1/<object_name>/capture`.
|
||||||
def self.custom_method(name, http_verb:, http_path: nil)
|
def self.custom_method(name, http_verb:, http_path: nil)
|
||||||
Util.custom_method self::RESOURCE_CLASS, self, name, http_verb, http_path
|
Util.custom_method resource_class, self, name, http_verb, http_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.resource_url
|
def self.resource_url
|
||||||
"/v1/test_helpers/" \
|
"/v1/test_helpers/" \
|
||||||
"#{self::RESOURCE_CLASS::OBJECT_NAME.downcase.tr('.', '/')}s"
|
"#{resource_class.object_name.downcase.tr('.', '/')}s"
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Create
|
include Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "list"
|
OBJECT_NAME = "list"
|
||||||
|
def self.object_name
|
||||||
|
"list"
|
||||||
|
end
|
||||||
|
|
||||||
# This accessor allows a `ListObject` to inherit various filters that were
|
# This accessor allows a `ListObject` to inherit various filters that were
|
||||||
# given to a predecessor. This allows for things like consistent limits,
|
# given to a predecessor. This allows for things like consistent limits,
|
||||||
|
@ -2,159 +2,161 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# rubocop:disable Metrics/MethodLength
|
# rubocop:disable Metrics/MethodLength
|
||||||
|
# rubocop:disable Metrics/AbcSize
|
||||||
|
|
||||||
module Stripe
|
module Stripe
|
||||||
module ObjectTypes
|
module ObjectTypes
|
||||||
def self.object_names_to_classes
|
def self.object_names_to_classes
|
||||||
{
|
{
|
||||||
# data structures
|
# data structures
|
||||||
ListObject::OBJECT_NAME => ListObject,
|
ListObject.object_name => ListObject,
|
||||||
SearchResultObject::OBJECT_NAME => SearchResultObject,
|
SearchResultObject.object_name => SearchResultObject,
|
||||||
|
|
||||||
# business objects
|
# business objects
|
||||||
File::OBJECT_NAME_ALT => File,
|
File.object_name_alt => File,
|
||||||
Account::OBJECT_NAME => Account,
|
Account.object_name => Account,
|
||||||
AccountLink::OBJECT_NAME => AccountLink,
|
AccountLink.object_name => AccountLink,
|
||||||
AccountNotice::OBJECT_NAME => AccountNotice,
|
AccountNotice.object_name => AccountNotice,
|
||||||
AccountSession::OBJECT_NAME => AccountSession,
|
AccountSession.object_name => AccountSession,
|
||||||
ApplePayDomain::OBJECT_NAME => ApplePayDomain,
|
ApplePayDomain.object_name => ApplePayDomain,
|
||||||
ApplicationFee::OBJECT_NAME => ApplicationFee,
|
ApplicationFee.object_name => ApplicationFee,
|
||||||
ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
|
ApplicationFeeRefund.object_name => ApplicationFeeRefund,
|
||||||
Apps::Secret::OBJECT_NAME => Apps::Secret,
|
Apps::Secret.object_name => Apps::Secret,
|
||||||
Balance::OBJECT_NAME => Balance,
|
Balance.object_name => Balance,
|
||||||
BalanceTransaction::OBJECT_NAME => BalanceTransaction,
|
BalanceTransaction.object_name => BalanceTransaction,
|
||||||
BankAccount::OBJECT_NAME => BankAccount,
|
BankAccount.object_name => BankAccount,
|
||||||
BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration,
|
BillingPortal::Configuration.object_name => BillingPortal::Configuration,
|
||||||
BillingPortal::Session::OBJECT_NAME => BillingPortal::Session,
|
BillingPortal::Session.object_name => BillingPortal::Session,
|
||||||
Capability::OBJECT_NAME => Capability,
|
Capability.object_name => Capability,
|
||||||
Capital::FinancingOffer::OBJECT_NAME => Capital::FinancingOffer,
|
Capital::FinancingOffer.object_name => Capital::FinancingOffer,
|
||||||
Capital::FinancingSummary::OBJECT_NAME => Capital::FinancingSummary,
|
Capital::FinancingSummary.object_name => Capital::FinancingSummary,
|
||||||
Capital::FinancingTransaction::OBJECT_NAME => Capital::FinancingTransaction,
|
Capital::FinancingTransaction.object_name => Capital::FinancingTransaction,
|
||||||
Card::OBJECT_NAME => Card,
|
Card.object_name => Card,
|
||||||
CashBalance::OBJECT_NAME => CashBalance,
|
CashBalance.object_name => CashBalance,
|
||||||
Charge::OBJECT_NAME => Charge,
|
Charge.object_name => Charge,
|
||||||
Checkout::Session::OBJECT_NAME => Checkout::Session,
|
Checkout::Session.object_name => Checkout::Session,
|
||||||
Climate::Order::OBJECT_NAME => Climate::Order,
|
Climate::Order.object_name => Climate::Order,
|
||||||
Climate::Product::OBJECT_NAME => Climate::Product,
|
Climate::Product.object_name => Climate::Product,
|
||||||
Climate::Supplier::OBJECT_NAME => Climate::Supplier,
|
Climate::Supplier.object_name => Climate::Supplier,
|
||||||
ConfirmationToken::OBJECT_NAME => ConfirmationToken,
|
ConfirmationToken.object_name => ConfirmationToken,
|
||||||
CountrySpec::OBJECT_NAME => CountrySpec,
|
CountrySpec.object_name => CountrySpec,
|
||||||
Coupon::OBJECT_NAME => Coupon,
|
Coupon.object_name => Coupon,
|
||||||
CreditNote::OBJECT_NAME => CreditNote,
|
CreditNote.object_name => CreditNote,
|
||||||
CreditNoteLineItem::OBJECT_NAME => CreditNoteLineItem,
|
CreditNoteLineItem.object_name => CreditNoteLineItem,
|
||||||
Customer::OBJECT_NAME => Customer,
|
Customer.object_name => Customer,
|
||||||
CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
|
CustomerBalanceTransaction.object_name => CustomerBalanceTransaction,
|
||||||
CustomerCashBalanceTransaction::OBJECT_NAME => CustomerCashBalanceTransaction,
|
CustomerCashBalanceTransaction.object_name => CustomerCashBalanceTransaction,
|
||||||
CustomerEntitlement::OBJECT_NAME => CustomerEntitlement,
|
CustomerEntitlement.object_name => CustomerEntitlement,
|
||||||
CustomerEntitlementSummary::OBJECT_NAME => CustomerEntitlementSummary,
|
CustomerEntitlementSummary.object_name => CustomerEntitlementSummary,
|
||||||
CustomerSession::OBJECT_NAME => CustomerSession,
|
CustomerSession.object_name => CustomerSession,
|
||||||
Discount::OBJECT_NAME => Discount,
|
Discount.object_name => Discount,
|
||||||
Dispute::OBJECT_NAME => Dispute,
|
Dispute.object_name => Dispute,
|
||||||
Entitlements::Event::OBJECT_NAME => Entitlements::Event,
|
Entitlements::Event.object_name => Entitlements::Event,
|
||||||
Entitlements::Feature::OBJECT_NAME => Entitlements::Feature,
|
Entitlements::Feature.object_name => Entitlements::Feature,
|
||||||
EphemeralKey::OBJECT_NAME => EphemeralKey,
|
EphemeralKey.object_name => EphemeralKey,
|
||||||
Event::OBJECT_NAME => Event,
|
Event.object_name => Event,
|
||||||
ExchangeRate::OBJECT_NAME => ExchangeRate,
|
ExchangeRate.object_name => ExchangeRate,
|
||||||
File::OBJECT_NAME => File,
|
File.object_name => File,
|
||||||
FileLink::OBJECT_NAME => FileLink,
|
FileLink.object_name => FileLink,
|
||||||
FinancialConnections::Account::OBJECT_NAME => FinancialConnections::Account,
|
FinancialConnections::Account.object_name => FinancialConnections::Account,
|
||||||
FinancialConnections::AccountInferredBalance::OBJECT_NAME =>
|
FinancialConnections::AccountInferredBalance.object_name =>
|
||||||
FinancialConnections::AccountInferredBalance,
|
FinancialConnections::AccountInferredBalance,
|
||||||
FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
|
FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
|
||||||
FinancialConnections::AccountOwnership::OBJECT_NAME =>
|
FinancialConnections::AccountOwnership.object_name =>
|
||||||
FinancialConnections::AccountOwnership,
|
FinancialConnections::AccountOwnership,
|
||||||
FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
|
FinancialConnections::Session.object_name => FinancialConnections::Session,
|
||||||
FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction,
|
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
|
||||||
FundingInstructions::OBJECT_NAME => FundingInstructions,
|
FundingInstructions.object_name => FundingInstructions,
|
||||||
GiftCards::Card::OBJECT_NAME => GiftCards::Card,
|
GiftCards::Card.object_name => GiftCards::Card,
|
||||||
GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction,
|
GiftCards::Transaction.object_name => GiftCards::Transaction,
|
||||||
Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
|
Identity::VerificationReport.object_name => Identity::VerificationReport,
|
||||||
Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
|
Identity::VerificationSession.object_name => Identity::VerificationSession,
|
||||||
Invoice::OBJECT_NAME => Invoice,
|
Invoice.object_name => Invoice,
|
||||||
InvoiceItem::OBJECT_NAME => InvoiceItem,
|
InvoiceItem.object_name => InvoiceItem,
|
||||||
InvoiceLineItem::OBJECT_NAME => InvoiceLineItem,
|
InvoiceLineItem.object_name => InvoiceLineItem,
|
||||||
InvoicePayment::OBJECT_NAME => InvoicePayment,
|
InvoicePayment.object_name => InvoicePayment,
|
||||||
Issuing::Authorization::OBJECT_NAME => Issuing::Authorization,
|
Issuing::Authorization.object_name => Issuing::Authorization,
|
||||||
Issuing::Card::OBJECT_NAME => Issuing::Card,
|
Issuing::Card.object_name => Issuing::Card,
|
||||||
Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder,
|
Issuing::Cardholder.object_name => Issuing::Cardholder,
|
||||||
Issuing::CreditUnderwritingRecord::OBJECT_NAME => Issuing::CreditUnderwritingRecord,
|
Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
|
||||||
Issuing::Dispute::OBJECT_NAME => Issuing::Dispute,
|
Issuing::Dispute.object_name => Issuing::Dispute,
|
||||||
Issuing::PersonalizationDesign::OBJECT_NAME => Issuing::PersonalizationDesign,
|
Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
|
||||||
Issuing::PhysicalBundle::OBJECT_NAME => Issuing::PhysicalBundle,
|
Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
|
||||||
Issuing::Token::OBJECT_NAME => Issuing::Token,
|
Issuing::Token.object_name => Issuing::Token,
|
||||||
Issuing::Transaction::OBJECT_NAME => Issuing::Transaction,
|
Issuing::Transaction.object_name => Issuing::Transaction,
|
||||||
LineItem::OBJECT_NAME => LineItem,
|
LineItem.object_name => LineItem,
|
||||||
LoginLink::OBJECT_NAME => LoginLink,
|
LoginLink.object_name => LoginLink,
|
||||||
Mandate::OBJECT_NAME => Mandate,
|
Mandate.object_name => Mandate,
|
||||||
Margin::OBJECT_NAME => Margin,
|
Margin.object_name => Margin,
|
||||||
Order::OBJECT_NAME => Order,
|
Order.object_name => Order,
|
||||||
PaymentIntent::OBJECT_NAME => PaymentIntent,
|
PaymentIntent.object_name => PaymentIntent,
|
||||||
PaymentLink::OBJECT_NAME => PaymentLink,
|
PaymentLink.object_name => PaymentLink,
|
||||||
PaymentMethod::OBJECT_NAME => PaymentMethod,
|
PaymentMethod.object_name => PaymentMethod,
|
||||||
PaymentMethodConfiguration::OBJECT_NAME => PaymentMethodConfiguration,
|
PaymentMethodConfiguration.object_name => PaymentMethodConfiguration,
|
||||||
PaymentMethodDomain::OBJECT_NAME => PaymentMethodDomain,
|
PaymentMethodDomain.object_name => PaymentMethodDomain,
|
||||||
Payout::OBJECT_NAME => Payout,
|
Payout.object_name => Payout,
|
||||||
Person::OBJECT_NAME => Person,
|
Person.object_name => Person,
|
||||||
Plan::OBJECT_NAME => Plan,
|
Plan.object_name => Plan,
|
||||||
Price::OBJECT_NAME => Price,
|
Price.object_name => Price,
|
||||||
Product::OBJECT_NAME => Product,
|
Product.object_name => Product,
|
||||||
PromotionCode::OBJECT_NAME => PromotionCode,
|
PromotionCode.object_name => PromotionCode,
|
||||||
Quote::OBJECT_NAME => Quote,
|
Quote.object_name => Quote,
|
||||||
QuotePhase::OBJECT_NAME => QuotePhase,
|
QuotePhase.object_name => QuotePhase,
|
||||||
QuotePreviewInvoice::OBJECT_NAME => QuotePreviewInvoice,
|
QuotePreviewInvoice.object_name => QuotePreviewInvoice,
|
||||||
QuotePreviewSubscriptionSchedule::OBJECT_NAME => QuotePreviewSubscriptionSchedule,
|
QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
|
||||||
Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
|
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
|
||||||
Radar::ValueList::OBJECT_NAME => Radar::ValueList,
|
Radar::ValueList.object_name => Radar::ValueList,
|
||||||
Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
|
Radar::ValueListItem.object_name => Radar::ValueListItem,
|
||||||
Refund::OBJECT_NAME => Refund,
|
Refund.object_name => Refund,
|
||||||
Reporting::ReportRun::OBJECT_NAME => Reporting::ReportRun,
|
Reporting::ReportRun.object_name => Reporting::ReportRun,
|
||||||
Reporting::ReportType::OBJECT_NAME => Reporting::ReportType,
|
Reporting::ReportType.object_name => Reporting::ReportType,
|
||||||
Reversal::OBJECT_NAME => Reversal,
|
Reversal.object_name => Reversal,
|
||||||
Review::OBJECT_NAME => Review,
|
Review.object_name => Review,
|
||||||
SetupAttempt::OBJECT_NAME => SetupAttempt,
|
SetupAttempt.object_name => SetupAttempt,
|
||||||
SetupIntent::OBJECT_NAME => SetupIntent,
|
SetupIntent.object_name => SetupIntent,
|
||||||
ShippingRate::OBJECT_NAME => ShippingRate,
|
ShippingRate.object_name => ShippingRate,
|
||||||
Sigma::ScheduledQueryRun::OBJECT_NAME => Sigma::ScheduledQueryRun,
|
Sigma::ScheduledQueryRun.object_name => Sigma::ScheduledQueryRun,
|
||||||
Source::OBJECT_NAME => Source,
|
Source.object_name => Source,
|
||||||
SourceTransaction::OBJECT_NAME => SourceTransaction,
|
SourceTransaction.object_name => SourceTransaction,
|
||||||
Subscription::OBJECT_NAME => Subscription,
|
Subscription.object_name => Subscription,
|
||||||
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
SubscriptionItem.object_name => SubscriptionItem,
|
||||||
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
SubscriptionSchedule.object_name => SubscriptionSchedule,
|
||||||
Tax::Calculation::OBJECT_NAME => Tax::Calculation,
|
Tax::Calculation.object_name => Tax::Calculation,
|
||||||
Tax::CalculationLineItem::OBJECT_NAME => Tax::CalculationLineItem,
|
Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
|
||||||
Tax::Form::OBJECT_NAME => Tax::Form,
|
Tax::Form.object_name => Tax::Form,
|
||||||
Tax::Registration::OBJECT_NAME => Tax::Registration,
|
Tax::Registration.object_name => Tax::Registration,
|
||||||
Tax::Settings::OBJECT_NAME => Tax::Settings,
|
Tax::Settings.object_name => Tax::Settings,
|
||||||
Tax::Transaction::OBJECT_NAME => Tax::Transaction,
|
Tax::Transaction.object_name => Tax::Transaction,
|
||||||
Tax::TransactionLineItem::OBJECT_NAME => Tax::TransactionLineItem,
|
Tax::TransactionLineItem.object_name => Tax::TransactionLineItem,
|
||||||
TaxCode::OBJECT_NAME => TaxCode,
|
TaxCode.object_name => TaxCode,
|
||||||
TaxId::OBJECT_NAME => TaxId,
|
TaxId.object_name => TaxId,
|
||||||
TaxRate::OBJECT_NAME => TaxRate,
|
TaxRate.object_name => TaxRate,
|
||||||
Terminal::Configuration::OBJECT_NAME => Terminal::Configuration,
|
Terminal::Configuration.object_name => Terminal::Configuration,
|
||||||
Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
|
Terminal::ConnectionToken.object_name => Terminal::ConnectionToken,
|
||||||
Terminal::Location::OBJECT_NAME => Terminal::Location,
|
Terminal::Location.object_name => Terminal::Location,
|
||||||
Terminal::Reader::OBJECT_NAME => Terminal::Reader,
|
Terminal::Reader.object_name => Terminal::Reader,
|
||||||
TestHelpers::TestClock::OBJECT_NAME => TestHelpers::TestClock,
|
TestHelpers::TestClock.object_name => TestHelpers::TestClock,
|
||||||
Token::OBJECT_NAME => Token,
|
Token.object_name => Token,
|
||||||
Topup::OBJECT_NAME => Topup,
|
Topup.object_name => Topup,
|
||||||
Transfer::OBJECT_NAME => Transfer,
|
Transfer.object_name => Transfer,
|
||||||
Treasury::CreditReversal::OBJECT_NAME => Treasury::CreditReversal,
|
Treasury::CreditReversal.object_name => Treasury::CreditReversal,
|
||||||
Treasury::DebitReversal::OBJECT_NAME => Treasury::DebitReversal,
|
Treasury::DebitReversal.object_name => Treasury::DebitReversal,
|
||||||
Treasury::FinancialAccount::OBJECT_NAME => Treasury::FinancialAccount,
|
Treasury::FinancialAccount.object_name => Treasury::FinancialAccount,
|
||||||
Treasury::FinancialAccountFeatures::OBJECT_NAME => Treasury::FinancialAccountFeatures,
|
Treasury::FinancialAccountFeatures.object_name => Treasury::FinancialAccountFeatures,
|
||||||
Treasury::InboundTransfer::OBJECT_NAME => Treasury::InboundTransfer,
|
Treasury::InboundTransfer.object_name => Treasury::InboundTransfer,
|
||||||
Treasury::OutboundPayment::OBJECT_NAME => Treasury::OutboundPayment,
|
Treasury::OutboundPayment.object_name => Treasury::OutboundPayment,
|
||||||
Treasury::OutboundTransfer::OBJECT_NAME => Treasury::OutboundTransfer,
|
Treasury::OutboundTransfer.object_name => Treasury::OutboundTransfer,
|
||||||
Treasury::ReceivedCredit::OBJECT_NAME => Treasury::ReceivedCredit,
|
Treasury::ReceivedCredit.object_name => Treasury::ReceivedCredit,
|
||||||
Treasury::ReceivedDebit::OBJECT_NAME => Treasury::ReceivedDebit,
|
Treasury::ReceivedDebit.object_name => Treasury::ReceivedDebit,
|
||||||
Treasury::Transaction::OBJECT_NAME => Treasury::Transaction,
|
Treasury::Transaction.object_name => Treasury::Transaction,
|
||||||
Treasury::TransactionEntry::OBJECT_NAME => Treasury::TransactionEntry,
|
Treasury::TransactionEntry.object_name => Treasury::TransactionEntry,
|
||||||
UsageRecord::OBJECT_NAME => UsageRecord,
|
UsageRecord.object_name => UsageRecord,
|
||||||
UsageRecordSummary::OBJECT_NAME => UsageRecordSummary,
|
UsageRecordSummary.object_name => UsageRecordSummary,
|
||||||
WebhookEndpoint::OBJECT_NAME => WebhookEndpoint,
|
WebhookEndpoint.object_name => WebhookEndpoint,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rubocop:enable Metrics/AbcSize
|
||||||
# rubocop:enable Metrics/MethodLength
|
# rubocop:enable Metrics/MethodLength
|
||||||
|
@ -17,6 +17,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "account"
|
OBJECT_NAME = "account"
|
||||||
|
def self.object_name
|
||||||
|
"account"
|
||||||
|
end
|
||||||
|
|
||||||
nested_resource_class_methods :capability,
|
nested_resource_class_methods :capability,
|
||||||
operations: %i[retrieve update list],
|
operations: %i[retrieve update list],
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "account_link"
|
OBJECT_NAME = "account_link"
|
||||||
|
def self.object_name
|
||||||
|
"account_link"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
|
# Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "account_notice"
|
OBJECT_NAME = "account_notice"
|
||||||
|
def self.object_name
|
||||||
|
"account_notice"
|
||||||
|
end
|
||||||
|
|
||||||
# Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
# Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "account_session"
|
OBJECT_NAME = "account_session"
|
||||||
|
def self.object_name
|
||||||
|
"account_session"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
|
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "apple_pay_domain"
|
OBJECT_NAME = "apple_pay_domain"
|
||||||
|
def self.object_name
|
||||||
|
"apple_pay_domain"
|
||||||
|
end
|
||||||
|
|
||||||
def self.resource_url
|
def self.resource_url
|
||||||
"/v1/apple_pay/domains"
|
"/v1/apple_pay/domains"
|
||||||
|
@ -7,6 +7,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "application_fee"
|
OBJECT_NAME = "application_fee"
|
||||||
|
def self.object_name
|
||||||
|
"application_fee"
|
||||||
|
end
|
||||||
|
|
||||||
nested_resource_class_methods :refund, operations: %i[create retrieve update list]
|
nested_resource_class_methods :refund, operations: %i[create retrieve update list]
|
||||||
|
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "fee_refund"
|
OBJECT_NAME = "fee_refund"
|
||||||
|
def self.object_name
|
||||||
|
"fee_refund"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
"#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \
|
"#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \
|
||||||
|
@ -17,6 +17,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "apps.secret"
|
OBJECT_NAME = "apps.secret"
|
||||||
|
def self.object_name
|
||||||
|
"apps.secret"
|
||||||
|
end
|
||||||
|
|
||||||
# Deletes a secret from the secret store by name and scope.
|
# Deletes a secret from the secret store by name and scope.
|
||||||
def self.delete_where(params = {}, opts = {})
|
def self.delete_where(params = {}, opts = {})
|
||||||
|
@ -15,5 +15,8 @@ module Stripe
|
|||||||
# Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
|
# Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
|
||||||
class Balance < SingletonAPIResource
|
class Balance < SingletonAPIResource
|
||||||
OBJECT_NAME = "balance"
|
OBJECT_NAME = "balance"
|
||||||
|
def self.object_name
|
||||||
|
"balance"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "balance_transaction"
|
OBJECT_NAME = "balance_transaction"
|
||||||
|
def self.object_name
|
||||||
|
"balance_transaction"
|
||||||
|
end
|
||||||
|
|
||||||
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
|
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
|
||||||
#
|
#
|
||||||
|
@ -15,6 +15,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "bank_account"
|
OBJECT_NAME = "bank_account"
|
||||||
|
def self.object_name
|
||||||
|
"bank_account"
|
||||||
|
end
|
||||||
|
|
||||||
def verify(params = {}, opts = {})
|
def verify(params = {}, opts = {})
|
||||||
resp, opts = execute_resource_request(:post, resource_url + "/verify", params, opts)
|
resp, opts = execute_resource_request(:post, resource_url + "/verify", params, opts)
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "billing_portal.configuration"
|
OBJECT_NAME = "billing_portal.configuration"
|
||||||
|
def self.object_name
|
||||||
|
"billing_portal.configuration"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a configuration that describes the functionality and behavior of a PortalSession
|
# Creates a configuration that describes the functionality and behavior of a PortalSession
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -21,6 +21,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "billing_portal.session"
|
OBJECT_NAME = "billing_portal.session"
|
||||||
|
def self.object_name
|
||||||
|
"billing_portal.session"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a session of the customer portal.
|
# Creates a session of the customer portal.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "capability"
|
OBJECT_NAME = "capability"
|
||||||
|
def self.object_name
|
||||||
|
"capability"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
if !respond_to?(:account) || account.nil?
|
if !respond_to?(:account) || account.nil?
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "capital.financing_offer"
|
OBJECT_NAME = "capital.financing_offer"
|
||||||
|
def self.object_name
|
||||||
|
"capital.financing_offer"
|
||||||
|
end
|
||||||
|
|
||||||
# Acknowledges that platform has received and delivered the financing_offer to
|
# Acknowledges that platform has received and delivered the financing_offer to
|
||||||
# the intended merchant recipient.
|
# the intended merchant recipient.
|
||||||
|
@ -7,6 +7,9 @@ module Stripe
|
|||||||
# platforms to read the state of Capital offered to their connected accounts.
|
# platforms to read the state of Capital offered to their connected accounts.
|
||||||
class FinancingSummary < SingletonAPIResource
|
class FinancingSummary < SingletonAPIResource
|
||||||
OBJECT_NAME = "capital.financing_summary"
|
OBJECT_NAME = "capital.financing_summary"
|
||||||
|
def self.object_name
|
||||||
|
"capital.financing_summary"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "capital.financing_transaction"
|
OBJECT_NAME = "capital.financing_transaction"
|
||||||
|
def self.object_name
|
||||||
|
"capital.financing_transaction"
|
||||||
|
end
|
||||||
|
|
||||||
# Returns a list of financing transactions. The transactions are returned in sorted order,
|
# Returns a list of financing transactions. The transactions are returned in sorted order,
|
||||||
# with the most recent transactions appearing first.
|
# with the most recent transactions appearing first.
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "card"
|
OBJECT_NAME = "card"
|
||||||
|
def self.object_name
|
||||||
|
"card"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
if respond_to?(:customer) && !customer.nil? && !customer.empty?
|
if respond_to?(:customer) && !customer.nil? && !customer.empty?
|
||||||
|
@ -5,6 +5,9 @@ module Stripe
|
|||||||
# A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
|
# A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
|
||||||
class CashBalance < APIResource
|
class CashBalance < APIResource
|
||||||
OBJECT_NAME = "cash_balance"
|
OBJECT_NAME = "cash_balance"
|
||||||
|
def self.object_name
|
||||||
|
"cash_balance"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
if !respond_to?(:customer) || customer.nil?
|
if !respond_to?(:customer) || customer.nil?
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "charge"
|
OBJECT_NAME = "charge"
|
||||||
|
def self.object_name
|
||||||
|
"charge"
|
||||||
|
end
|
||||||
|
|
||||||
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
||||||
#
|
#
|
||||||
|
@ -22,6 +22,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "checkout.session"
|
OBJECT_NAME = "checkout.session"
|
||||||
|
def self.object_name
|
||||||
|
"checkout.session"
|
||||||
|
end
|
||||||
|
|
||||||
# A Session can be expired when it is in one of these statuses: open
|
# A Session can be expired when it is in one of these statuses: open
|
||||||
#
|
#
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "climate.order"
|
OBJECT_NAME = "climate.order"
|
||||||
|
def self.object_name
|
||||||
|
"climate.order"
|
||||||
|
end
|
||||||
|
|
||||||
# Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
|
# Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
|
||||||
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "climate.product"
|
OBJECT_NAME = "climate.product"
|
||||||
|
def self.object_name
|
||||||
|
"climate.product"
|
||||||
|
end
|
||||||
|
|
||||||
# Lists all available Climate product objects.
|
# Lists all available Climate product objects.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "climate.supplier"
|
OBJECT_NAME = "climate.supplier"
|
||||||
|
def self.object_name
|
||||||
|
"climate.supplier"
|
||||||
|
end
|
||||||
|
|
||||||
# Lists all available Climate supplier objects.
|
# Lists all available Climate supplier objects.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -9,5 +9,8 @@ module Stripe
|
|||||||
# To learn more or request access, visit the related guided: [Finalize payments on the server using Confirmation Tokens](https://stripe.com/docs/payments/finalize-payments-on-the-server-confirmation-tokens).
|
# To learn more or request access, visit the related guided: [Finalize payments on the server using Confirmation Tokens](https://stripe.com/docs/payments/finalize-payments-on-the-server-confirmation-tokens).
|
||||||
class ConfirmationToken < APIResource
|
class ConfirmationToken < APIResource
|
||||||
OBJECT_NAME = "confirmation_token"
|
OBJECT_NAME = "confirmation_token"
|
||||||
|
def self.object_name
|
||||||
|
"confirmation_token"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "country_spec"
|
OBJECT_NAME = "country_spec"
|
||||||
|
def self.object_name
|
||||||
|
"country_spec"
|
||||||
|
end
|
||||||
|
|
||||||
# Lists all Country Spec objects available in the API.
|
# Lists all Country Spec objects available in the API.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "coupon"
|
OBJECT_NAME = "coupon"
|
||||||
|
def self.object_name
|
||||||
|
"coupon"
|
||||||
|
end
|
||||||
|
|
||||||
# You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
|
# You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
|
||||||
#
|
#
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "credit_note"
|
OBJECT_NAME = "credit_note"
|
||||||
|
def self.object_name
|
||||||
|
"credit_note"
|
||||||
|
end
|
||||||
|
|
||||||
# Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
|
# Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
|
||||||
def void_credit_note(params = {}, opts = {})
|
def void_credit_note(params = {}, opts = {})
|
||||||
|
@ -5,5 +5,8 @@ module Stripe
|
|||||||
# The credit note line item object
|
# The credit note line item object
|
||||||
class CreditNoteLineItem < StripeObject
|
class CreditNoteLineItem < StripeObject
|
||||||
OBJECT_NAME = "credit_note_line_item"
|
OBJECT_NAME = "credit_note_line_item"
|
||||||
|
def self.object_name
|
||||||
|
"credit_note_line_item"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -14,6 +14,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "customer"
|
OBJECT_NAME = "customer"
|
||||||
|
def self.object_name
|
||||||
|
"customer"
|
||||||
|
end
|
||||||
|
|
||||||
nested_resource_class_methods :balance_transaction, operations: %i[create retrieve update list]
|
nested_resource_class_methods :balance_transaction, operations: %i[create retrieve update list]
|
||||||
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
|
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
|
||||||
@ -200,6 +203,9 @@ module Stripe
|
|||||||
|
|
||||||
class TestHelpers < APIResourceTestHelpers
|
class TestHelpers < APIResourceTestHelpers
|
||||||
RESOURCE_CLASS = Customer
|
RESOURCE_CLASS = Customer
|
||||||
|
def self.resource_class
|
||||||
|
"Customer"
|
||||||
|
end
|
||||||
|
|
||||||
# Create an incoming testmode bank transfer
|
# Create an incoming testmode bank transfer
|
||||||
def self.fund_cash_balance(customer, params = {}, opts = {})
|
def self.fund_cash_balance(customer, params = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "customer_balance_transaction"
|
OBJECT_NAME = "customer_balance_transaction"
|
||||||
|
def self.object_name
|
||||||
|
"customer_balance_transaction"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
if !respond_to?(:customer) || customer.nil?
|
if !respond_to?(:customer) || customer.nil?
|
||||||
|
@ -8,5 +8,8 @@ module Stripe
|
|||||||
# to payments, and refunds to the customer.
|
# to payments, and refunds to the customer.
|
||||||
class CustomerCashBalanceTransaction < APIResource
|
class CustomerCashBalanceTransaction < APIResource
|
||||||
OBJECT_NAME = "customer_cash_balance_transaction"
|
OBJECT_NAME = "customer_cash_balance_transaction"
|
||||||
|
def self.object_name
|
||||||
|
"customer_cash_balance_transaction"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,5 +5,8 @@ module Stripe
|
|||||||
# A entitlement for a customer describes access to a feature.
|
# A entitlement for a customer describes access to a feature.
|
||||||
class CustomerEntitlement < APIResource
|
class CustomerEntitlement < APIResource
|
||||||
OBJECT_NAME = "customer_entitlement"
|
OBJECT_NAME = "customer_entitlement"
|
||||||
|
def self.object_name
|
||||||
|
"customer_entitlement"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,5 +5,8 @@ module Stripe
|
|||||||
# A summary of a customer's entitlements.
|
# A summary of a customer's entitlements.
|
||||||
class CustomerEntitlementSummary < APIResource
|
class CustomerEntitlementSummary < APIResource
|
||||||
OBJECT_NAME = "customer_entitlement_summary"
|
OBJECT_NAME = "customer_entitlement_summary"
|
||||||
|
def self.object_name
|
||||||
|
"customer_entitlement_summary"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "customer_session"
|
OBJECT_NAME = "customer_session"
|
||||||
|
def self.object_name
|
||||||
|
"customer_session"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
|
# Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -8,5 +8,8 @@ module Stripe
|
|||||||
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
||||||
class Discount < StripeObject
|
class Discount < StripeObject
|
||||||
OBJECT_NAME = "discount"
|
OBJECT_NAME = "discount"
|
||||||
|
def self.object_name
|
||||||
|
"discount"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "dispute"
|
OBJECT_NAME = "dispute"
|
||||||
|
def self.object_name
|
||||||
|
"dispute"
|
||||||
|
end
|
||||||
|
|
||||||
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
||||||
#
|
#
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "entitlements.event"
|
OBJECT_NAME = "entitlements.event"
|
||||||
|
def self.object_name
|
||||||
|
"entitlements.event"
|
||||||
|
end
|
||||||
|
|
||||||
# Create an entitlement event manually, outside of the entitlement events automatically created by Stripe lifecycle events.
|
# Create an entitlement event manually, outside of the entitlement events automatically created by Stripe lifecycle events.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "entitlements.feature"
|
OBJECT_NAME = "entitlements.feature"
|
||||||
|
def self.object_name
|
||||||
|
"entitlements.feature"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a feature
|
# Creates a feature
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -7,6 +7,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Delete
|
include Stripe::APIOperations::Delete
|
||||||
|
|
||||||
OBJECT_NAME = "ephemeral_key"
|
OBJECT_NAME = "ephemeral_key"
|
||||||
|
def self.object_name
|
||||||
|
"ephemeral_key"
|
||||||
|
end
|
||||||
|
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
opts = Util.normalize_opts(opts)
|
opts = Util.normalize_opts(opts)
|
||||||
|
@ -36,6 +36,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "event"
|
OBJECT_NAME = "event"
|
||||||
|
def self.object_name
|
||||||
|
"event"
|
||||||
|
end
|
||||||
|
|
||||||
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
|
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -32,6 +32,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "exchange_rate"
|
OBJECT_NAME = "exchange_rate"
|
||||||
|
def self.object_name
|
||||||
|
"exchange_rate"
|
||||||
|
end
|
||||||
|
|
||||||
# Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
|
# Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -14,12 +14,18 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "file"
|
OBJECT_NAME = "file"
|
||||||
|
def self.object_name
|
||||||
|
"file"
|
||||||
|
end
|
||||||
|
|
||||||
# This resource can have two different object names. In latter API
|
# This resource can have two different object names. In latter API
|
||||||
# versions, only `file` is used, but since stripe-ruby may be used with
|
# versions, only `file` is used, but since stripe-ruby may be used with
|
||||||
# any API version, we need to support deserializing the older
|
# any API version, we need to support deserializing the older
|
||||||
# `file_upload` object into the same class.
|
# `file_upload` object into the same class.
|
||||||
OBJECT_NAME_ALT = "file_upload"
|
OBJECT_NAME_ALT = "file_upload"
|
||||||
|
def self.object_name_alt
|
||||||
|
"file_upload"
|
||||||
|
end
|
||||||
|
|
||||||
def self.resource_url
|
def self.resource_url
|
||||||
"/v1/files"
|
"/v1/files"
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "file_link"
|
OBJECT_NAME = "file_link"
|
||||||
|
def self.object_name
|
||||||
|
"file_link"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new file link object.
|
# Creates a new file link object.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "financial_connections.account"
|
OBJECT_NAME = "financial_connections.account"
|
||||||
|
def self.object_name
|
||||||
|
"financial_connections.account"
|
||||||
|
end
|
||||||
|
|
||||||
nested_resource_class_methods :inferred_balance, operations: %i[list]
|
nested_resource_class_methods :inferred_balance, operations: %i[list]
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@ module Stripe
|
|||||||
# A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
|
# A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
|
||||||
class AccountInferredBalance < APIResource
|
class AccountInferredBalance < APIResource
|
||||||
OBJECT_NAME = "financial_connections.account_inferred_balance"
|
OBJECT_NAME = "financial_connections.account_inferred_balance"
|
||||||
|
def self.object_name
|
||||||
|
"financial_connections.account_inferred_balance"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,6 +6,9 @@ module Stripe
|
|||||||
# Describes an owner of an account.
|
# Describes an owner of an account.
|
||||||
class AccountOwner < StripeObject
|
class AccountOwner < StripeObject
|
||||||
OBJECT_NAME = "financial_connections.account_owner"
|
OBJECT_NAME = "financial_connections.account_owner"
|
||||||
|
def self.object_name
|
||||||
|
"financial_connections.account_owner"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,6 +6,9 @@ module Stripe
|
|||||||
# Describes a snapshot of the owners of an account at a particular point in time.
|
# Describes a snapshot of the owners of an account at a particular point in time.
|
||||||
class AccountOwnership < StripeObject
|
class AccountOwnership < StripeObject
|
||||||
OBJECT_NAME = "financial_connections.account_ownership"
|
OBJECT_NAME = "financial_connections.account_ownership"
|
||||||
|
def self.object_name
|
||||||
|
"financial_connections.account_ownership"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::Create
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
OBJECT_NAME = "financial_connections.session"
|
OBJECT_NAME = "financial_connections.session"
|
||||||
|
def self.object_name
|
||||||
|
"financial_connections.session"
|
||||||
|
end
|
||||||
|
|
||||||
# To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
|
# To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "financial_connections.transaction"
|
OBJECT_NAME = "financial_connections.transaction"
|
||||||
|
def self.object_name
|
||||||
|
"financial_connections.transaction"
|
||||||
|
end
|
||||||
|
|
||||||
# Returns a list of Financial Connections Transaction objects.
|
# Returns a list of Financial Connections Transaction objects.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
# Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)
|
# Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions)
|
||||||
class FundingInstructions < APIResource
|
class FundingInstructions < APIResource
|
||||||
OBJECT_NAME = "funding_instructions"
|
OBJECT_NAME = "funding_instructions"
|
||||||
|
def self.object_name
|
||||||
|
"funding_instructions"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
if !respond_to?(:customer) || customer.nil?
|
if !respond_to?(:customer) || customer.nil?
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "gift_cards.card"
|
OBJECT_NAME = "gift_cards.card"
|
||||||
|
def self.object_name
|
||||||
|
"gift_cards.card"
|
||||||
|
end
|
||||||
|
|
||||||
# Validates a gift card code, returning the matching gift card object if it exists.
|
# Validates a gift card code, returning the matching gift card object if it exists.
|
||||||
def self.validate(params = {}, opts = {})
|
def self.validate(params = {}, opts = {})
|
||||||
|
@ -15,6 +15,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "gift_cards.transaction"
|
OBJECT_NAME = "gift_cards.transaction"
|
||||||
|
def self.object_name
|
||||||
|
"gift_cards.transaction"
|
||||||
|
end
|
||||||
|
|
||||||
# Cancel a gift card transaction
|
# Cancel a gift card transaction
|
||||||
def cancel(params = {}, opts = {})
|
def cancel(params = {}, opts = {})
|
||||||
|
@ -18,6 +18,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "identity.verification_report"
|
OBJECT_NAME = "identity.verification_report"
|
||||||
|
def self.object_name
|
||||||
|
"identity.verification_report"
|
||||||
|
end
|
||||||
|
|
||||||
# List all verification reports.
|
# List all verification reports.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -20,6 +20,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "identity.verification_session"
|
OBJECT_NAME = "identity.verification_session"
|
||||||
|
def self.object_name
|
||||||
|
"identity.verification_session"
|
||||||
|
end
|
||||||
|
|
||||||
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
|
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
|
||||||
#
|
#
|
||||||
|
@ -43,6 +43,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "invoice"
|
OBJECT_NAME = "invoice"
|
||||||
|
def self.object_name
|
||||||
|
"invoice"
|
||||||
|
end
|
||||||
|
|
||||||
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
||||||
|
|
||||||
|
@ -20,6 +20,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "invoiceitem"
|
OBJECT_NAME = "invoiceitem"
|
||||||
|
def self.object_name
|
||||||
|
"invoiceitem"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
|
# Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -4,5 +4,8 @@
|
|||||||
module Stripe
|
module Stripe
|
||||||
class InvoiceLineItem < StripeObject
|
class InvoiceLineItem < StripeObject
|
||||||
OBJECT_NAME = "line_item"
|
OBJECT_NAME = "line_item"
|
||||||
|
def self.object_name
|
||||||
|
"line_item"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,5 +5,8 @@ module Stripe
|
|||||||
# The invoice payment object
|
# The invoice payment object
|
||||||
class InvoicePayment < APIResource
|
class InvoicePayment < APIResource
|
||||||
OBJECT_NAME = "invoice_payment"
|
OBJECT_NAME = "invoice_payment"
|
||||||
|
def self.object_name
|
||||||
|
"invoice_payment"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.authorization"
|
OBJECT_NAME = "issuing.authorization"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.authorization"
|
||||||
|
end
|
||||||
|
|
||||||
# [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.
|
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
||||||
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
# 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).
|
||||||
@ -84,6 +87,9 @@ module Stripe
|
|||||||
|
|
||||||
class TestHelpers < APIResourceTestHelpers
|
class TestHelpers < APIResourceTestHelpers
|
||||||
RESOURCE_CLASS = Authorization
|
RESOURCE_CLASS = Authorization
|
||||||
|
def self.resource_class
|
||||||
|
"Authorization"
|
||||||
|
end
|
||||||
|
|
||||||
# Capture a test-mode authorization.
|
# Capture a test-mode authorization.
|
||||||
def self.capture(authorization, params = {}, opts = {})
|
def self.capture(authorization, params = {}, opts = {})
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.card"
|
OBJECT_NAME = "issuing.card"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.card"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates an Issuing Card object.
|
# Creates an Issuing Card object.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
@ -37,6 +40,9 @@ module Stripe
|
|||||||
|
|
||||||
class TestHelpers < APIResourceTestHelpers
|
class TestHelpers < APIResourceTestHelpers
|
||||||
RESOURCE_CLASS = Card
|
RESOURCE_CLASS = Card
|
||||||
|
def self.resource_class
|
||||||
|
"Card"
|
||||||
|
end
|
||||||
|
|
||||||
# Updates the shipping status of the specified Issuing Card object to delivered.
|
# Updates the shipping status of the specified Issuing Card object to delivered.
|
||||||
def self.deliver_card(card, params = {}, opts = {})
|
def self.deliver_card(card, params = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.cardholder"
|
OBJECT_NAME = "issuing.cardholder"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.cardholder"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new Issuing Cardholder object that can be issued cards.
|
# Creates a new Issuing Cardholder object that can be issued cards.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.credit_underwriting_record"
|
OBJECT_NAME = "issuing.credit_underwriting_record"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.credit_underwriting_record"
|
||||||
|
end
|
||||||
|
|
||||||
# Update a CreditUnderwritingRecord object to correct mistakes.
|
# Update a CreditUnderwritingRecord object to correct mistakes.
|
||||||
def correct(params = {}, opts = {})
|
def correct(params = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.dispute"
|
OBJECT_NAME = "issuing.dispute"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.dispute"
|
||||||
|
end
|
||||||
|
|
||||||
# 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).
|
# 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).
|
||||||
def submit(params = {}, opts = {})
|
def submit(params = {}, opts = {})
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.personalization_design"
|
OBJECT_NAME = "issuing.personalization_design"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.personalization_design"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a personalization design object.
|
# Creates a personalization design object.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
@ -47,6 +50,9 @@ module Stripe
|
|||||||
|
|
||||||
class TestHelpers < APIResourceTestHelpers
|
class TestHelpers < APIResourceTestHelpers
|
||||||
RESOURCE_CLASS = PersonalizationDesign
|
RESOURCE_CLASS = PersonalizationDesign
|
||||||
|
def self.resource_class
|
||||||
|
"PersonalizationDesign"
|
||||||
|
end
|
||||||
|
|
||||||
# Updates the status of the specified testmode personalization design object to active.
|
# Updates the status of the specified testmode personalization design object to active.
|
||||||
def self.activate(personalization_design, params = {}, opts = {})
|
def self.activate(personalization_design, params = {}, opts = {})
|
||||||
|
@ -8,6 +8,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.physical_bundle"
|
OBJECT_NAME = "issuing.physical_bundle"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.physical_bundle"
|
||||||
|
end
|
||||||
|
|
||||||
# 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.
|
# Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -9,6 +9,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.token"
|
OBJECT_NAME = "issuing.token"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.token"
|
||||||
|
end
|
||||||
|
|
||||||
# Lists all Issuing Token objects for a given card.
|
# Lists all Issuing Token objects for a given card.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "issuing.transaction"
|
OBJECT_NAME = "issuing.transaction"
|
||||||
|
def self.object_name
|
||||||
|
"issuing.transaction"
|
||||||
|
end
|
||||||
|
|
||||||
# Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
# Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
@ -40,6 +43,9 @@ module Stripe
|
|||||||
|
|
||||||
class TestHelpers < APIResourceTestHelpers
|
class TestHelpers < APIResourceTestHelpers
|
||||||
RESOURCE_CLASS = Transaction
|
RESOURCE_CLASS = Transaction
|
||||||
|
def self.resource_class
|
||||||
|
"Transaction"
|
||||||
|
end
|
||||||
|
|
||||||
# Allows the user to capture an arbitrary amount, also known as a forced capture.
|
# Allows the user to capture an arbitrary amount, also known as a forced capture.
|
||||||
def self.create_force_capture(params = {}, opts = {})
|
def self.create_force_capture(params = {}, opts = {})
|
||||||
|
@ -5,5 +5,8 @@ module Stripe
|
|||||||
# A line item.
|
# A line item.
|
||||||
class LineItem < APIResource
|
class LineItem < APIResource
|
||||||
OBJECT_NAME = "item"
|
OBJECT_NAME = "item"
|
||||||
|
def self.object_name
|
||||||
|
"item"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,6 +5,9 @@ module Stripe
|
|||||||
# Login Links are single-use login link for an Express account to access their Stripe dashboard.
|
# Login Links are single-use login link for an Express account to access their Stripe dashboard.
|
||||||
class LoginLink < APIResource
|
class LoginLink < APIResource
|
||||||
OBJECT_NAME = "login_link"
|
OBJECT_NAME = "login_link"
|
||||||
|
def self.object_name
|
||||||
|
"login_link"
|
||||||
|
end
|
||||||
|
|
||||||
def self.retrieve(_id, _opts = nil)
|
def self.retrieve(_id, _opts = nil)
|
||||||
raise NotImplementedError,
|
raise NotImplementedError,
|
||||||
|
@ -5,5 +5,8 @@ module Stripe
|
|||||||
# A Mandate is a record of the permission that your customer gives you to debit their payment method.
|
# A Mandate is a record of the permission that your customer gives you to debit their payment method.
|
||||||
class Mandate < APIResource
|
class Mandate < APIResource
|
||||||
OBJECT_NAME = "mandate"
|
OBJECT_NAME = "mandate"
|
||||||
|
def self.object_name
|
||||||
|
"mandate"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "margin"
|
OBJECT_NAME = "margin"
|
||||||
|
def self.object_name
|
||||||
|
"margin"
|
||||||
|
end
|
||||||
|
|
||||||
# Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
|
# Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "order"
|
OBJECT_NAME = "order"
|
||||||
|
def self.object_name
|
||||||
|
"order"
|
||||||
|
end
|
||||||
|
|
||||||
# Cancels the order as well as the payment intent if one is attached.
|
# Cancels the order as well as the payment intent if one is attached.
|
||||||
def cancel(params = {}, opts = {})
|
def cancel(params = {}, opts = {})
|
||||||
|
@ -20,6 +20,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "payment_intent"
|
OBJECT_NAME = "payment_intent"
|
||||||
|
def self.object_name
|
||||||
|
"payment_intent"
|
||||||
|
end
|
||||||
|
|
||||||
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
|
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
|
||||||
def apply_customer_balance(params = {}, opts = {})
|
def apply_customer_balance(params = {}, opts = {})
|
||||||
@ -80,8 +83,7 @@ module Stripe
|
|||||||
# return to the requires_confirmation state
|
# return to the requires_confirmation state
|
||||||
# after those actions are completed. Your server needs to then
|
# after those actions are completed. Your server needs to then
|
||||||
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
||||||
# attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual)
|
# attempt.
|
||||||
# to learn more about manual confirmation.
|
|
||||||
def confirm(params = {}, opts = {})
|
def confirm(params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -193,8 +195,7 @@ module Stripe
|
|||||||
# return to the requires_confirmation state
|
# return to the requires_confirmation state
|
||||||
# after those actions are completed. Your server needs to then
|
# after those actions are completed. Your server needs to then
|
||||||
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
||||||
# attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual)
|
# attempt.
|
||||||
# to learn more about manual confirmation.
|
|
||||||
def self.confirm(intent, params = {}, opts = {})
|
def self.confirm(intent, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "payment_link"
|
OBJECT_NAME = "payment_link"
|
||||||
|
def self.object_name
|
||||||
|
"payment_link"
|
||||||
|
end
|
||||||
|
|
||||||
# When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
# When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
||||||
def list_line_items(params = {}, opts = {})
|
def list_line_items(params = {}, opts = {})
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "payment_method"
|
OBJECT_NAME = "payment_method"
|
||||||
|
def self.object_name
|
||||||
|
"payment_method"
|
||||||
|
end
|
||||||
|
|
||||||
# Attaches a PaymentMethod object to a Customer.
|
# Attaches a PaymentMethod object to a Customer.
|
||||||
#
|
#
|
||||||
|
@ -22,6 +22,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "payment_method_configuration"
|
OBJECT_NAME = "payment_method_configuration"
|
||||||
|
def self.object_name
|
||||||
|
"payment_method_configuration"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a payment method configuration
|
# Creates a payment method configuration
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "payment_method_domain"
|
OBJECT_NAME = "payment_method_domain"
|
||||||
|
def self.object_name
|
||||||
|
"payment_method_domain"
|
||||||
|
end
|
||||||
|
|
||||||
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
|
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
|
||||||
# The payment method doesn't appear in Elements for this domain until it is active.
|
# The payment method doesn't appear in Elements for this domain until it is active.
|
||||||
|
@ -16,6 +16,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "payout"
|
OBJECT_NAME = "payout"
|
||||||
|
def self.object_name
|
||||||
|
"payout"
|
||||||
|
end
|
||||||
|
|
||||||
# You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
|
# You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
|
||||||
def cancel(params = {}, opts = {})
|
def cancel(params = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "person"
|
OBJECT_NAME = "person"
|
||||||
|
def self.object_name
|
||||||
|
"person"
|
||||||
|
end
|
||||||
|
|
||||||
def resource_url
|
def resource_url
|
||||||
if !respond_to?(:account) || account.nil?
|
if !respond_to?(:account) || account.nil?
|
||||||
|
@ -17,6 +17,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "plan"
|
OBJECT_NAME = "plan"
|
||||||
|
def self.object_name
|
||||||
|
"plan"
|
||||||
|
end
|
||||||
|
|
||||||
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
|
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -15,6 +15,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "price"
|
OBJECT_NAME = "price"
|
||||||
|
def self.object_name
|
||||||
|
"price"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new price for an existing product. The price can be recurring or one-time.
|
# Creates a new price for an existing product. The price can be recurring or one-time.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -18,6 +18,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "product"
|
OBJECT_NAME = "product"
|
||||||
|
def self.object_name
|
||||||
|
"product"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new product object.
|
# Creates a new product object.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -10,6 +10,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "promotion_code"
|
OBJECT_NAME = "promotion_code"
|
||||||
|
def self.object_name
|
||||||
|
"promotion_code"
|
||||||
|
end
|
||||||
|
|
||||||
# A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
|
# A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::NestedResource
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "quote"
|
OBJECT_NAME = "quote"
|
||||||
|
def self.object_name
|
||||||
|
"quote"
|
||||||
|
end
|
||||||
|
|
||||||
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
||||||
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
||||||
|
@ -7,6 +7,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "quote_phase"
|
OBJECT_NAME = "quote_phase"
|
||||||
|
def self.object_name
|
||||||
|
"quote_phase"
|
||||||
|
end
|
||||||
|
|
||||||
# When retrieving a quote phase, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
# When retrieving a quote phase, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
||||||
def list_line_items(params = {}, opts = {})
|
def list_line_items(params = {}, opts = {})
|
||||||
|
@ -36,5 +36,8 @@ module Stripe
|
|||||||
# Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
|
# Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
|
||||||
class QuotePreviewInvoice < APIResource
|
class QuotePreviewInvoice < APIResource
|
||||||
OBJECT_NAME = "quote_preview_invoice"
|
OBJECT_NAME = "quote_preview_invoice"
|
||||||
|
def self.object_name
|
||||||
|
"quote_preview_invoice"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,5 +4,8 @@
|
|||||||
module Stripe
|
module Stripe
|
||||||
class QuotePreviewSubscriptionSchedule < APIResource
|
class QuotePreviewSubscriptionSchedule < APIResource
|
||||||
OBJECT_NAME = "quote_preview_subscription_schedule"
|
OBJECT_NAME = "quote_preview_subscription_schedule"
|
||||||
|
def self.object_name
|
||||||
|
"quote_preview_subscription_schedule"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -11,6 +11,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "radar.early_fraud_warning"
|
OBJECT_NAME = "radar.early_fraud_warning"
|
||||||
|
def self.object_name
|
||||||
|
"radar.early_fraud_warning"
|
||||||
|
end
|
||||||
|
|
||||||
# Returns a list of early fraud warnings.
|
# Returns a list of early fraud warnings.
|
||||||
def self.list(filters = {}, opts = {})
|
def self.list(filters = {}, opts = {})
|
||||||
|
@ -13,6 +13,9 @@ module Stripe
|
|||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
OBJECT_NAME = "radar.value_list"
|
OBJECT_NAME = "radar.value_list"
|
||||||
|
def self.object_name
|
||||||
|
"radar.value_list"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new ValueList object, which can then be referenced in rules.
|
# Creates a new ValueList object, which can then be referenced in rules.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
@ -12,6 +12,9 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
OBJECT_NAME = "radar.value_list_item"
|
OBJECT_NAME = "radar.value_list_item"
|
||||||
|
def self.object_name
|
||||||
|
"radar.value_list_item"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new ValueListItem object, which is added to the specified parent value list.
|
# Creates a new ValueListItem object, which is added to the specified parent value list.
|
||||||
def self.create(params = {}, opts = {})
|
def self.create(params = {}, opts = {})
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user