Skip to content

Commit 3919242

Browse files
⚠️ Unify resource and service method parameters into one class (stripe#1670)
* updated rubocop * manual changes * generated changes * remove commented * Add typed: true annotations to rbi * regenerate --------- Co-authored-by: David Brownman <xavdid@stripe.com>
1 parent af31acc commit 3919242

1,695 files changed

Lines changed: 266735 additions & 450997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rubocop.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Layout/LineLength:
2020
- "lib/stripe/resources/**/*.rb"
2121
- "lib/stripe/services/**/*.rb"
2222
- "lib/stripe/events/**/*.rb"
23+
- "lib/stripe/params/**/*.rb"
2324
- "test/**/*.rb"
2425

2526
Lint/MissingSuper:
2627
Exclude:
27-
- "lib/stripe/resources/**/*.rb"
28-
- "lib/stripe/services/**/*.rb"
28+
- "lib/stripe/params/**/*.rb"
2929
- "test/stripe/request_params_test.rb"
3030

3131
Metrics/AbcSize:
@@ -92,20 +92,18 @@ Metrics/ParameterLists:
9292
- "lib/stripe/api_operations/request.rb"
9393
- "lib/stripe/stripe_object.rb"
9494
- "lib/stripe/stripe_client.rb"
95-
- "lib/stripe/resources/**/*.rb"
96-
- "lib/stripe/services/**/*.rb"
95+
- "lib/stripe/params/**/*.rb"
9796

9897
Naming/MethodParameterName:
9998
# We have many parameters that are less than 3 characters for tax codes
10099
Exclude:
101-
- "lib/stripe/resources/**/*.rb"
102-
- "lib/stripe/services/**/*.rb"
100+
- "lib/stripe/params/**/*.rb"
103101

104102
Naming/VariableNumber:
105103
# We use a variety of variable number syntaxes
106104
Exclude:
107105
- "lib/stripe/resources/**/*.rb"
108-
- "lib/stripe/services/**/*.rb"
106+
- "lib/stripe/params/**/*.rb"
109107

110108
Style/AccessModifierDeclarations:
111109
EnforcedStyle: inline

lib/stripe.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
# Named API resources
5858
require "stripe/resources"
5959
require "stripe/services"
60+
require "stripe/params"
6061

6162
# OAuth
6263
require "stripe/oauth"

lib/stripe/params.rb

Lines changed: 588 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# File generated from our OpenAPI spec
2+
# frozen_string_literal: true
3+
4+
module Stripe
5+
class AccountCapabilityListParams < Stripe::RequestParams
6+
# Specifies which fields in the response should be expanded.
7+
attr_accessor :expand
8+
9+
def initialize(expand: nil)
10+
@expand = expand
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# File generated from our OpenAPI spec
2+
# frozen_string_literal: true
3+
4+
module Stripe
5+
class AccountCapabilityRetrieveParams < Stripe::RequestParams
6+
# Specifies which fields in the response should be expanded.
7+
attr_accessor :expand
8+
9+
def initialize(expand: nil)
10+
@expand = expand
11+
end
12+
end
13+
end
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# File generated from our OpenAPI spec
2+
# frozen_string_literal: true
3+
4+
module Stripe
5+
class AccountCapabilityUpdateParams < Stripe::RequestParams
6+
# Specifies which fields in the response should be expanded.
7+
attr_accessor :expand
8+
# To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
9+
#
10+
# If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
11+
attr_accessor :requested
12+
13+
def initialize(expand: nil, requested: nil)
14+
@expand = expand
15+
@requested = requested
16+
end
17+
end
18+
end

0 commit comments

Comments
 (0)