mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-04 00:00:47 -04:00
Updated rubocop (#1585)
This commit is contained in:
parent
36547afd0f
commit
ca00b676f0
70
.rubocop.yml
70
.rubocop.yml
@ -326,3 +326,73 @@ Style/SwapValues: # new in 1.1
|
|||||||
Enabled: true
|
Enabled: true
|
||||||
Style/YAMLFileRead: # new in 1.53
|
Style/YAMLFileRead: # new in 1.53
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Gemspec/AddRuntimeDependency: # new in 1.65
|
||||||
|
Enabled: true
|
||||||
|
Lint/ArrayLiteralInRegexp: # new in 1.71
|
||||||
|
Enabled: true
|
||||||
|
Lint/ConstantReassignment: # new in 1.70
|
||||||
|
Enabled: true
|
||||||
|
Lint/CopDirectiveSyntax: # new in 1.72
|
||||||
|
Enabled: true
|
||||||
|
Lint/DuplicateSetElement: # new in 1.67
|
||||||
|
Enabled: true
|
||||||
|
Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
|
||||||
|
Enabled: true
|
||||||
|
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
||||||
|
Enabled: true
|
||||||
|
Lint/LiteralAssignmentInCondition: # new in 1.58
|
||||||
|
Enabled: true
|
||||||
|
Lint/NumericOperationWithConstantResult: # new in 1.69
|
||||||
|
Enabled: true
|
||||||
|
Lint/RedundantTypeConversion: # new in 1.72
|
||||||
|
Enabled: true
|
||||||
|
Lint/SharedMutableDefault: # new in 1.70
|
||||||
|
Enabled: true
|
||||||
|
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
|
||||||
|
Enabled: true
|
||||||
|
Lint/UnescapedBracketInRegexp: # new in 1.68
|
||||||
|
Enabled: true
|
||||||
|
Lint/UselessConstantScoping: # new in 1.72
|
||||||
|
Enabled: true
|
||||||
|
Lint/UselessDefined: # new in 1.69
|
||||||
|
Enabled: true
|
||||||
|
Lint/UselessNumericOperation: # new in 1.66
|
||||||
|
Enabled: true
|
||||||
|
Style/AmbiguousEndlessMethodDefinition: # new in 1.68
|
||||||
|
Enabled: true
|
||||||
|
Style/BitwisePredicate: # new in 1.68
|
||||||
|
Enabled: true
|
||||||
|
Style/CombinableDefined: # new in 1.68
|
||||||
|
Enabled: true
|
||||||
|
Style/ComparableBetween: # new in 1.74
|
||||||
|
Enabled: true
|
||||||
|
Style/DigChain: # new in 1.69
|
||||||
|
Enabled: true
|
||||||
|
Style/FileNull: # new in 1.69
|
||||||
|
Enabled: true
|
||||||
|
Style/FileTouch: # new in 1.69
|
||||||
|
Enabled: true
|
||||||
|
Style/HashFetchChain: # new in 1.75
|
||||||
|
Enabled: true
|
||||||
|
Style/HashSlice: # new in 1.71
|
||||||
|
Enabled: true
|
||||||
|
Style/ItAssignment: # new in 1.70
|
||||||
|
Enabled: true
|
||||||
|
Style/ItBlockParameter: # new in 1.75
|
||||||
|
Enabled: true
|
||||||
|
Style/KeywordArgumentsMerging: # new in 1.68
|
||||||
|
Enabled: true
|
||||||
|
Style/MapIntoArray: # new in 1.63
|
||||||
|
Enabled: true
|
||||||
|
Style/RedundantFormat: # new in 1.72
|
||||||
|
Enabled: true
|
||||||
|
Style/RedundantInterpolationUnfreeze: # new in 1.66
|
||||||
|
Enabled: true
|
||||||
|
Style/SafeNavigationChainLength: # new in 1.68
|
||||||
|
Enabled: true
|
||||||
|
Style/SendWithLiteralMethodName: # new in 1.64
|
||||||
|
Enabled: true
|
||||||
|
Style/SuperArguments: # new in 1.64
|
||||||
|
Enabled: true
|
||||||
|
Style/SuperWithArgsParentheses: # new in 1.58
|
||||||
|
Enabled: true
|
||||||
|
2
Gemfile
2
Gemfile
@ -24,7 +24,7 @@ group :development do
|
|||||||
# up-to-date, but it's not the end of the world if it's not.
|
# up-to-date, but it's not the end of the world if it's not.
|
||||||
#
|
#
|
||||||
# The latest version of rubocop is only compatible with Ruby 2.7+
|
# The latest version of rubocop is only compatible with Ruby 2.7+
|
||||||
gem "rubocop", "1.57.2" if RUBY_VERSION >= "2.7"
|
gem "rubocop", "1.75.2" if RUBY_VERSION >= "2.7"
|
||||||
|
|
||||||
gem "sorbet"
|
gem "sorbet"
|
||||||
gem "tapioca"
|
gem "tapioca"
|
||||||
|
@ -913,7 +913,7 @@ module Stripe
|
|||||||
"with Stripe. Please let us know at support@stripe.com."
|
"with Stripe. Please let us know at support@stripe.com."
|
||||||
end
|
end
|
||||||
|
|
||||||
message = message % base_url
|
message %= base_url
|
||||||
|
|
||||||
message += " Request was retried #{num_retries} times." if num_retries > 0
|
message += " Request was retried #{num_retries} times." if num_retries > 0
|
||||||
|
|
||||||
|
@ -36,9 +36,7 @@ module Stripe
|
|||||||
# clears them from internal tracking.
|
# clears them from internal tracking.
|
||||||
def clear
|
def clear
|
||||||
@mutex.synchronize do
|
@mutex.synchronize do
|
||||||
@active_connections.each do |_, connection|
|
@active_connections.each_value(&:finish)
|
||||||
connection.finish
|
|
||||||
end
|
|
||||||
@active_connections = {}
|
@active_connections = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@ module Stripe
|
|||||||
def self.execute_resource_request(method, url, base_address, params, opts)
|
def self.execute_resource_request(method, url, base_address, params, opts)
|
||||||
opts = Util.normalize_opts(opts)
|
opts = Util.normalize_opts(opts)
|
||||||
|
|
||||||
super(method, url, base_address, params, opts)
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4804,7 +4804,7 @@ module Stripe
|
|||||||
opts = id
|
opts = id
|
||||||
id = nil
|
id = nil
|
||||||
end
|
end
|
||||||
super(id, opts)
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
# We are not adding a helper for capabilities here as the Account object
|
# We are not adding a helper for capabilities here as the Account object
|
||||||
@ -4844,7 +4844,7 @@ module Stripe
|
|||||||
entity_update[:additional_owners] =
|
entity_update[:additional_owners] =
|
||||||
serialize_additional_owners(entity, owners)
|
serialize_additional_owners(entity, owners)
|
||||||
end
|
end
|
||||||
if (individual = @values[:individual]) && (individual.is_a?(Person) && !update_hash.key?(:individual))
|
if (individual = @values[:individual]) && individual.is_a?(Person) && !update_hash.key?(:individual)
|
||||||
update_hash[:individual] = individual.serialize_params(options)
|
update_hash[:individual] = individual.serialize_params(options)
|
||||||
end
|
end
|
||||||
update_hash
|
update_hash
|
||||||
|
@ -326,7 +326,7 @@ module Stripe
|
|||||||
raise NotImplementedError,
|
raise NotImplementedError,
|
||||||
"FundingInstructions cannot be accessed without a customer ID."
|
"FundingInstructions cannot be accessed without a customer ID."
|
||||||
end
|
end
|
||||||
"#{Customer.resource_url}/#{CGI.escape(customer)}/funding_instructions" "/#{CGI.escape(id)}"
|
"#{Customer.resource_url}/#{CGI.escape(customer)}/funding_instructions" + "/#{CGI.escape(id)}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :capabilities, :external_accounts, :login_links, :persons
|
attr_reader :capabilities, :external_accounts, :login_links, :persons
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@capabilities = Stripe::AccountCapabilityService.new(@requestor)
|
@capabilities = Stripe::AccountCapabilityService.new(@requestor)
|
||||||
@external_accounts = Stripe::AccountExternalAccountService.new(@requestor)
|
@external_accounts = Stripe::AccountExternalAccountService.new(@requestor)
|
||||||
@login_links = Stripe::AccountLoginLinkService.new(@requestor)
|
@login_links = Stripe::AccountLoginLinkService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :refunds
|
attr_reader :refunds
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@refunds = Stripe::ApplicationFeeRefundService.new(@requestor)
|
@refunds = Stripe::ApplicationFeeRefundService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :secrets
|
attr_reader :secrets
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@secrets = Stripe::Apps::SecretService.new(@requestor)
|
@secrets = Stripe::Apps::SecretService.new(@requestor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :event_summaries
|
attr_reader :event_summaries
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
|
@event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :configurations, :sessions
|
attr_reader :configurations, :sessions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@configurations = Stripe::BillingPortal::ConfigurationService.new(@requestor)
|
@configurations = Stripe::BillingPortal::ConfigurationService.new(@requestor)
|
||||||
@sessions = Stripe::BillingPortal::SessionService.new(@requestor)
|
@sessions = Stripe::BillingPortal::SessionService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :alerts, :credit_balance_summary, :credit_balance_transactions, :credit_grants, :meters, :meter_events, :meter_event_adjustments
|
attr_reader :alerts, :credit_balance_summary, :credit_balance_transactions, :credit_grants, :meters, :meter_events, :meter_event_adjustments
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@alerts = Stripe::Billing::AlertService.new(@requestor)
|
@alerts = Stripe::Billing::AlertService.new(@requestor)
|
||||||
@credit_balance_summary = Stripe::Billing::CreditBalanceSummaryService.new(@requestor)
|
@credit_balance_summary = Stripe::Billing::CreditBalanceSummaryService.new(@requestor)
|
||||||
@credit_balance_transactions = Stripe::Billing::CreditBalanceTransactionService
|
@credit_balance_transactions = Stripe::Billing::CreditBalanceTransactionService
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :line_items
|
attr_reader :line_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::Checkout::SessionLineItemService.new(@requestor)
|
@line_items = Stripe::Checkout::SessionLineItemService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :sessions
|
attr_reader :sessions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@sessions = Stripe::Checkout::SessionService.new(@requestor)
|
@sessions = Stripe::Checkout::SessionService.new(@requestor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :orders, :products, :suppliers
|
attr_reader :orders, :products, :suppliers
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@orders = Stripe::Climate::OrderService.new(@requestor)
|
@orders = Stripe::Climate::OrderService.new(@requestor)
|
||||||
@products = Stripe::Climate::ProductService.new(@requestor)
|
@products = Stripe::Climate::ProductService.new(@requestor)
|
||||||
@suppliers = Stripe::Climate::SupplierService.new(@requestor)
|
@suppliers = Stripe::Climate::SupplierService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :line_items, :preview_lines
|
attr_reader :line_items, :preview_lines
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::CreditNoteLineItemService.new(@requestor)
|
@line_items = Stripe::CreditNoteLineItemService.new(@requestor)
|
||||||
@preview_lines = Stripe::CreditNotePreviewLinesService.new(@requestor)
|
@preview_lines = Stripe::CreditNotePreviewLinesService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :cash_balance, :balance_transactions, :cash_balance_transactions, :payment_sources, :tax_ids, :payment_methods, :funding_instructions
|
attr_reader :cash_balance, :balance_transactions, :cash_balance_transactions, :payment_sources, :tax_ids, :payment_methods, :funding_instructions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@cash_balance = Stripe::CustomerCashBalanceService.new(@requestor)
|
@cash_balance = Stripe::CustomerCashBalanceService.new(@requestor)
|
||||||
@balance_transactions = Stripe::CustomerBalanceTransactionService.new(@requestor)
|
@balance_transactions = Stripe::CustomerBalanceTransactionService.new(@requestor)
|
||||||
@cash_balance_transactions = Stripe::CustomerCashBalanceTransactionService.new(@requestor)
|
@cash_balance_transactions = Stripe::CustomerCashBalanceTransactionService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :active_entitlements, :features
|
attr_reader :active_entitlements, :features
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@active_entitlements = Stripe::Entitlements::ActiveEntitlementService.new(@requestor)
|
@active_entitlements = Stripe::Entitlements::ActiveEntitlementService.new(@requestor)
|
||||||
@features = Stripe::Entitlements::FeatureService.new(@requestor)
|
@features = Stripe::Entitlements::FeatureService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :owners
|
attr_reader :owners
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
|
@owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :accounts, :sessions, :transactions
|
attr_reader :accounts, :sessions, :transactions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@accounts = Stripe::FinancialConnections::AccountService.new(@requestor)
|
@accounts = Stripe::FinancialConnections::AccountService.new(@requestor)
|
||||||
@sessions = Stripe::FinancialConnections::SessionService.new(@requestor)
|
@sessions = Stripe::FinancialConnections::SessionService.new(@requestor)
|
||||||
@transactions = Stripe::FinancialConnections::TransactionService.new(@requestor)
|
@transactions = Stripe::FinancialConnections::TransactionService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :requests
|
attr_reader :requests
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@requests = Stripe::Forwarding::RequestService.new(@requestor)
|
@requests = Stripe::Forwarding::RequestService.new(@requestor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :verification_reports, :verification_sessions
|
attr_reader :verification_reports, :verification_sessions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@verification_reports = Stripe::Identity::VerificationReportService.new(@requestor)
|
@verification_reports = Stripe::Identity::VerificationReportService.new(@requestor)
|
||||||
@verification_sessions = Stripe::Identity::VerificationSessionService.new(@requestor)
|
@verification_sessions = Stripe::Identity::VerificationSessionService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :line_items
|
attr_reader :line_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::InvoiceLineItemService.new(@requestor)
|
@line_items = Stripe::InvoiceLineItemService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :authorizations, :cards, :cardholders, :disputes, :personalization_designs, :physical_bundles, :tokens, :transactions
|
attr_reader :authorizations, :cards, :cardholders, :disputes, :personalization_designs, :physical_bundles, :tokens, :transactions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@authorizations = Stripe::Issuing::AuthorizationService.new(@requestor)
|
@authorizations = Stripe::Issuing::AuthorizationService.new(@requestor)
|
||||||
@cards = Stripe::Issuing::CardService.new(@requestor)
|
@cards = Stripe::Issuing::CardService.new(@requestor)
|
||||||
@cardholders = Stripe::Issuing::CardholderService.new(@requestor)
|
@cardholders = Stripe::Issuing::CardholderService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :line_items
|
attr_reader :line_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::PaymentLinkLineItemService.new(@requestor)
|
@line_items = Stripe::PaymentLinkLineItemService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :features
|
attr_reader :features
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@features = Stripe::ProductFeatureService.new(@requestor)
|
@features = Stripe::ProductFeatureService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :line_items, :computed_upfront_line_items
|
attr_reader :line_items, :computed_upfront_line_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
||||||
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :early_fraud_warnings, :value_lists, :value_list_items
|
attr_reader :early_fraud_warnings, :value_lists, :value_list_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@early_fraud_warnings = Stripe::Radar::EarlyFraudWarningService.new(@requestor)
|
@early_fraud_warnings = Stripe::Radar::EarlyFraudWarningService.new(@requestor)
|
||||||
@value_lists = Stripe::Radar::ValueListService.new(@requestor)
|
@value_lists = Stripe::Radar::ValueListService.new(@requestor)
|
||||||
@value_list_items = Stripe::Radar::ValueListItemService.new(@requestor)
|
@value_list_items = Stripe::Radar::ValueListItemService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :report_runs, :report_types
|
attr_reader :report_runs, :report_types
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@report_runs = Stripe::Reporting::ReportRunService.new(@requestor)
|
@report_runs = Stripe::Reporting::ReportRunService.new(@requestor)
|
||||||
@report_types = Stripe::Reporting::ReportTypeService.new(@requestor)
|
@report_types = Stripe::Reporting::ReportTypeService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :scheduled_query_runs
|
attr_reader :scheduled_query_runs
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@scheduled_query_runs = Stripe::Sigma::ScheduledQueryRunService.new(@requestor)
|
@scheduled_query_runs = Stripe::Sigma::ScheduledQueryRunService.new(@requestor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :transactions
|
attr_reader :transactions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@transactions = Stripe::SourceTransactionService.new(@requestor)
|
@transactions = Stripe::SourceTransactionService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :line_items
|
attr_reader :line_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::Tax::CalculationLineItemService.new(@requestor)
|
@line_items = Stripe::Tax::CalculationLineItemService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :line_items
|
attr_reader :line_items
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@line_items = Stripe::Tax::TransactionLineItemService.new(@requestor)
|
@line_items = Stripe::Tax::TransactionLineItemService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :calculations, :registrations, :settings, :transactions
|
attr_reader :calculations, :registrations, :settings, :transactions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@calculations = Stripe::Tax::CalculationService.new(@requestor)
|
@calculations = Stripe::Tax::CalculationService.new(@requestor)
|
||||||
@registrations = Stripe::Tax::RegistrationService.new(@requestor)
|
@registrations = Stripe::Tax::RegistrationService.new(@requestor)
|
||||||
@settings = Stripe::Tax::SettingsService.new(@requestor)
|
@settings = Stripe::Tax::SettingsService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :configurations, :connection_tokens, :locations, :readers
|
attr_reader :configurations, :connection_tokens, :locations, :readers
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@configurations = Stripe::Terminal::ConfigurationService.new(@requestor)
|
@configurations = Stripe::Terminal::ConfigurationService.new(@requestor)
|
||||||
@connection_tokens = Stripe::Terminal::ConnectionTokenService.new(@requestor)
|
@connection_tokens = Stripe::Terminal::ConnectionTokenService.new(@requestor)
|
||||||
@locations = Stripe::Terminal::LocationService.new(@requestor)
|
@locations = Stripe::Terminal::LocationService.new(@requestor)
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :authorizations, :cards, :personalization_designs, :transactions
|
attr_reader :authorizations, :cards, :personalization_designs, :transactions
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@authorizations = Stripe::TestHelpers::Issuing::AuthorizationService.new(@requestor)
|
@authorizations = Stripe::TestHelpers::Issuing::AuthorizationService.new(@requestor)
|
||||||
@cards = Stripe::TestHelpers::Issuing::CardService.new(@requestor)
|
@cards = Stripe::TestHelpers::Issuing::CardService.new(@requestor)
|
||||||
@personalization_designs = Stripe::TestHelpers::Issuing::PersonalizationDesignService
|
@personalization_designs = Stripe::TestHelpers::Issuing::PersonalizationDesignService
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :readers
|
attr_reader :readers
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@readers = Stripe::TestHelpers::Terminal::ReaderService.new(@requestor)
|
@readers = Stripe::TestHelpers::Terminal::ReaderService.new(@requestor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :inbound_transfers, :outbound_payments, :outbound_transfers, :received_credits, :received_debits
|
attr_reader :inbound_transfers, :outbound_payments, :outbound_transfers, :received_credits, :received_debits
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@inbound_transfers = Stripe::TestHelpers::Treasury::InboundTransferService.new(@requestor)
|
@inbound_transfers = Stripe::TestHelpers::Treasury::InboundTransferService.new(@requestor)
|
||||||
@outbound_payments = Stripe::TestHelpers::Treasury::OutboundPaymentService.new(@requestor)
|
@outbound_payments = Stripe::TestHelpers::Treasury::OutboundPaymentService.new(@requestor)
|
||||||
@outbound_transfers = Stripe::TestHelpers::Treasury::OutboundTransferService.new(@requestor)
|
@outbound_transfers = Stripe::TestHelpers::Treasury::OutboundTransferService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :confirmation_tokens, :customers, :issuing, :refunds, :terminal, :test_clocks, :treasury
|
attr_reader :confirmation_tokens, :customers, :issuing, :refunds, :terminal, :test_clocks, :treasury
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@confirmation_tokens = Stripe::TestHelpers::ConfirmationTokenService.new(@requestor)
|
@confirmation_tokens = Stripe::TestHelpers::ConfirmationTokenService.new(@requestor)
|
||||||
@customers = Stripe::TestHelpers::CustomerService.new(@requestor)
|
@customers = Stripe::TestHelpers::CustomerService.new(@requestor)
|
||||||
@issuing = Stripe::TestHelpers::IssuingService.new(@requestor)
|
@issuing = Stripe::TestHelpers::IssuingService.new(@requestor)
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :reversals
|
attr_reader :reversals
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@reversals = Stripe::TransferReversalService.new(@requestor)
|
@reversals = Stripe::TransferReversalService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :features
|
attr_reader :features
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@features = Stripe::Treasury::FinancialAccountFeaturesService.new(@requestor)
|
@features = Stripe::Treasury::FinancialAccountFeaturesService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :credit_reversals, :debit_reversals, :financial_accounts, :inbound_transfers, :outbound_payments, :outbound_transfers, :received_credits, :received_debits, :transactions, :transaction_entries
|
attr_reader :credit_reversals, :debit_reversals, :financial_accounts, :inbound_transfers, :outbound_payments, :outbound_transfers, :received_credits, :received_debits, :transactions, :transaction_entries
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@credit_reversals = Stripe::Treasury::CreditReversalService.new(@requestor)
|
@credit_reversals = Stripe::Treasury::CreditReversalService.new(@requestor)
|
||||||
@debit_reversals = Stripe::Treasury::DebitReversalService.new(@requestor)
|
@debit_reversals = Stripe::Treasury::DebitReversalService.new(@requestor)
|
||||||
@financial_accounts = Stripe::Treasury::FinancialAccountService.new(@requestor)
|
@financial_accounts = Stripe::Treasury::FinancialAccountService.new(@requestor)
|
||||||
|
@ -11,7 +11,7 @@ module Stripe
|
|||||||
attr_reader :oauth
|
attr_reader :oauth
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
# v1 services: The beginning of the section generated from our OpenAPI spec
|
# v1 services: The beginning of the section generated from our OpenAPI spec
|
||||||
@accounts = Stripe::AccountService.new(@requestor)
|
@accounts = Stripe::AccountService.new(@requestor)
|
||||||
@account_links = Stripe::AccountLinkService.new(@requestor)
|
@account_links = Stripe::AccountLinkService.new(@requestor)
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :meter_event_session, :meter_event_adjustments, :meter_event_stream, :meter_events
|
attr_reader :meter_event_session, :meter_event_adjustments, :meter_event_stream, :meter_events
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor)
|
@meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor)
|
||||||
@meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor)
|
@meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor)
|
||||||
@meter_event_stream = Stripe::V2::Billing::MeterEventStreamService.new(@requestor)
|
@meter_event_stream = Stripe::V2::Billing::MeterEventStreamService.new(@requestor)
|
||||||
|
@ -7,7 +7,7 @@ module Stripe
|
|||||||
attr_reader :event_destinations, :events
|
attr_reader :event_destinations, :events
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@event_destinations = Stripe::V2::Core::EventDestinationService.new(@requestor)
|
@event_destinations = Stripe::V2::Core::EventDestinationService.new(@requestor)
|
||||||
@events = Stripe::V2::Core::EventService.new(@requestor)
|
@events = Stripe::V2::Core::EventService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Stripe
|
|||||||
attr_reader :billing, :core
|
attr_reader :billing, :core
|
||||||
|
|
||||||
def initialize(requestor)
|
def initialize(requestor)
|
||||||
super(requestor)
|
super
|
||||||
@billing = Stripe::V2::BillingService.new(@requestor)
|
@billing = Stripe::V2::BillingService.new(@requestor)
|
||||||
@core = Stripe::V2::CoreService.new(@requestor)
|
@core = Stripe::V2::CoreService.new(@requestor)
|
||||||
end
|
end
|
||||||
|
@ -492,7 +492,7 @@ module Stripe
|
|||||||
data[:thread_object_id] == Thread.current.object_id &&
|
data[:thread_object_id] == Thread.current.object_id &&
|
||||||
(data[:connection_manager_object_id].is_a? Numeric) &&
|
(data[:connection_manager_object_id].is_a? Numeric) &&
|
||||||
(data[:connection_object_id].is_a? Numeric) &&
|
(data[:connection_object_id].is_a? Numeric) &&
|
||||||
data[:log_timestamp] == 0.0 # rubocop:todo Lint/FloatComparison
|
data[:log_timestamp] == 0.0
|
||||||
end
|
end
|
||||||
|
|
||||||
response_object_id = nil
|
response_object_id = nil
|
||||||
@ -506,7 +506,7 @@ module Stripe
|
|||||||
data[:connection_manager_object_id] == connection_manager_data[:connection_manager_object_id] &&
|
data[:connection_manager_object_id] == connection_manager_data[:connection_manager_object_id] &&
|
||||||
data[:connection_object_id] == connection_manager_data[:connection_object_id] &&
|
data[:connection_object_id] == connection_manager_data[:connection_object_id] &&
|
||||||
(data[:response_object_id].is_a? Numeric) &&
|
(data[:response_object_id].is_a? Numeric) &&
|
||||||
data[:log_timestamp] == 0.0 # rubocop:todo Lint/FloatComparison
|
data[:log_timestamp] == 0.0
|
||||||
response_object_id = data[:response_object_id]
|
response_object_id = data[:response_object_id]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -547,7 +547,7 @@ module Stripe
|
|||||||
data[:process_id] == Process.pid &&
|
data[:process_id] == Process.pid &&
|
||||||
data[:thread_object_id] == Thread.current.object_id &&
|
data[:thread_object_id] == Thread.current.object_id &&
|
||||||
data[:response_object_id] == response_object_id &&
|
data[:response_object_id] == response_object_id &&
|
||||||
data[:log_timestamp] == 0.0 # rubocop:todo Lint/FloatComparison
|
data[:log_timestamp] == 0.0
|
||||||
# Streaming requests have a different body.
|
# Streaming requests have a different body.
|
||||||
if request_method == "execute_request_stream"
|
if request_method == "execute_request_stream"
|
||||||
data[:body].is_a? Net::ReadAdapter
|
data[:body].is_a? Net::ReadAdapter
|
||||||
|
@ -99,7 +99,7 @@ module Stripe
|
|||||||
|
|
||||||
context "client_init" do
|
context "client_init" do
|
||||||
setup do
|
setup do
|
||||||
@client_opts = Hash[StripeClient::CLIENT_OPTIONS.map { |k| [k, nil] }] # rubocop:todo Style/HashConversion - necessary for Ruby <= 2.5
|
@client_opts = Hash[StripeClient::CLIENT_OPTIONS.map { |k| [k, nil] }] # rubocop:todo Style/HashConversion -- necessary for Ruby <= 2.5
|
||||||
@old_api_key = Stripe.api_key
|
@old_api_key = Stripe.api_key
|
||||||
@old_stripe_account = Stripe.stripe_account
|
@old_stripe_account = Stripe.stripe_account
|
||||||
@old_enable_telemetry = Stripe.instance_variable_get(:@enable_telemetry)
|
@old_enable_telemetry = Stripe.instance_variable_get(:@enable_telemetry)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user