Skip to content

Commit df81e2e

Browse files
Update generated code for v2156 and
1 parent 921c0c9 commit df81e2e

File tree

7 files changed

+120
-10
lines changed

7 files changed

+120
-10
lines changed

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8989becedb2153519066ec2233cbf5880b938188
1+
8c8709034677788a8c86b775cd16f40ecb5fb7db

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2155
1+
v2156

lib/stripe/params/coupon_create_params.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,28 @@ def initialize(configuration: nil, id: nil)
3434
end
3535

3636
class ServicePeriod < ::Stripe::RequestParams
37+
class Iterations < ::Stripe::RequestParams
38+
# The number of iterations the service period will repeat for. Only used when type is `count`, defaults to 1.
39+
attr_accessor :count
40+
# The type of iterations, defaults to `count` if omitted.
41+
attr_accessor :type
42+
43+
def initialize(count: nil, type: nil)
44+
@count = count
45+
@type = type
46+
end
47+
end
3748
# Specifies coupon frequency. Either `day`, `week`, `month` or `year`.
3849
attr_accessor :interval
3950
# The number of intervals for which the coupon will be applied.
4051
attr_accessor :interval_count
52+
# Specifies the number of times the coupon is contiguously applied.
53+
attr_accessor :iterations
4154

42-
def initialize(interval: nil, interval_count: nil)
55+
def initialize(interval: nil, interval_count: nil, iterations: nil)
4356
@interval = interval
4457
@interval_count = interval_count
58+
@iterations = iterations
4559
end
4660
end
4761
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).

lib/stripe/resources/coupon.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,29 @@ def self.field_remappings
6060
end
6161

6262
class ServicePeriod < ::Stripe::StripeObject
63+
class Iterations < ::Stripe::StripeObject
64+
# Attribute for field count
65+
attr_reader :count
66+
# Attribute for field type
67+
attr_reader :type
68+
69+
def self.inner_class_types
70+
@inner_class_types = {}
71+
end
72+
73+
def self.field_remappings
74+
@field_remappings = {}
75+
end
76+
end
6377
# Attribute for field interval
6478
attr_reader :interval
6579
# Attribute for field interval_count
6680
attr_reader :interval_count
81+
# Attribute for field iterations
82+
attr_reader :iterations
6783

6884
def self.inner_class_types
69-
@inner_class_types = {}
85+
@inner_class_types = { iterations: Iterations }
7086
end
7187

7288
def self.field_remappings

rbi/stripe.rbi

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16512,14 +16512,31 @@ module Stripe
1651216512
end
1651316513
end
1651416514
class ServicePeriod < ::Stripe::StripeObject
16515+
class Iterations < ::Stripe::StripeObject
16516+
# Attribute for field count
16517+
sig { returns(T.nilable(Integer)) }
16518+
def count; end
16519+
# Attribute for field type
16520+
sig { returns(String) }
16521+
def type; end
16522+
def self.inner_class_types
16523+
@inner_class_types = {}
16524+
end
16525+
def self.field_remappings
16526+
@field_remappings = {}
16527+
end
16528+
end
1651516529
# Attribute for field interval
1651616530
sig { returns(String) }
1651716531
def interval; end
1651816532
# Attribute for field interval_count
1651916533
sig { returns(Integer) }
1652016534
def interval_count; end
16535+
# Attribute for field iterations
16536+
sig { returns(Iterations) }
16537+
def iterations; end
1652116538
def self.inner_class_types
16522-
@inner_class_types = {}
16539+
@inner_class_types = {iterations: Iterations}
1652316540
end
1652416541
def self.field_remappings
1652516542
@field_remappings = {}
@@ -104799,6 +104816,20 @@ module Stripe
104799104816
def initialize(configuration: nil, id: nil); end
104800104817
end
104801104818
class ServicePeriod < ::Stripe::RequestParams
104819+
class Iterations < ::Stripe::RequestParams
104820+
# The number of iterations the service period will repeat for. Only used when type is `count`, defaults to 1.
104821+
sig { returns(T.nilable(Integer)) }
104822+
def count; end
104823+
sig { params(_count: T.nilable(Integer)).returns(T.nilable(Integer)) }
104824+
def count=(_count); end
104825+
# The type of iterations, defaults to `count` if omitted.
104826+
sig { returns(String) }
104827+
def type; end
104828+
sig { params(_type: String).returns(String) }
104829+
def type=(_type); end
104830+
sig { params(count: T.nilable(Integer), type: String).void }
104831+
def initialize(count: nil, type: nil); end
104832+
end
104802104833
# Specifies coupon frequency. Either `day`, `week`, `month` or `year`.
104803104834
sig { returns(String) }
104804104835
def interval; end
@@ -104809,8 +104840,17 @@ module Stripe
104809104840
def interval_count; end
104810104841
sig { params(_interval_count: Integer).returns(Integer) }
104811104842
def interval_count=(_interval_count); end
104812-
sig { params(interval: String, interval_count: Integer).void }
104813-
def initialize(interval: nil, interval_count: nil); end
104843+
# Specifies the number of times the coupon is contiguously applied.
104844+
sig { returns(T.nilable(CouponCreateParams::ServicePeriod::Iterations)) }
104845+
def iterations; end
104846+
sig {
104847+
params(_iterations: T.nilable(CouponCreateParams::ServicePeriod::Iterations)).returns(T.nilable(CouponCreateParams::ServicePeriod::Iterations))
104848+
}
104849+
def iterations=(_iterations); end
104850+
sig {
104851+
params(interval: String, interval_count: Integer, iterations: T.nilable(CouponCreateParams::ServicePeriod::Iterations)).void
104852+
}
104853+
def initialize(interval: nil, interval_count: nil, iterations: nil); end
104814104854
end
104815104855
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
104816104856
sig { returns(T.nilable(Integer)) }

rbi/stripe/params/coupon_create_params.rbi

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ module Stripe
3737
def initialize(configuration: nil, id: nil); end
3838
end
3939
class ServicePeriod < ::Stripe::RequestParams
40+
class Iterations < ::Stripe::RequestParams
41+
# The number of iterations the service period will repeat for. Only used when type is `count`, defaults to 1.
42+
sig { returns(T.nilable(Integer)) }
43+
def count; end
44+
sig { params(_count: T.nilable(Integer)).returns(T.nilable(Integer)) }
45+
def count=(_count); end
46+
# The type of iterations, defaults to `count` if omitted.
47+
sig { returns(String) }
48+
def type; end
49+
sig { params(_type: String).returns(String) }
50+
def type=(_type); end
51+
sig { params(count: T.nilable(Integer), type: String).void }
52+
def initialize(count: nil, type: nil); end
53+
end
4054
# Specifies coupon frequency. Either `day`, `week`, `month` or `year`.
4155
sig { returns(String) }
4256
def interval; end
@@ -47,8 +61,17 @@ module Stripe
4761
def interval_count; end
4862
sig { params(_interval_count: Integer).returns(Integer) }
4963
def interval_count=(_interval_count); end
50-
sig { params(interval: String, interval_count: Integer).void }
51-
def initialize(interval: nil, interval_count: nil); end
64+
# Specifies the number of times the coupon is contiguously applied.
65+
sig { returns(T.nilable(CouponCreateParams::ServicePeriod::Iterations)) }
66+
def iterations; end
67+
sig {
68+
params(_iterations: T.nilable(CouponCreateParams::ServicePeriod::Iterations)).returns(T.nilable(CouponCreateParams::ServicePeriod::Iterations))
69+
}
70+
def iterations=(_iterations); end
71+
sig {
72+
params(interval: String, interval_count: Integer, iterations: T.nilable(CouponCreateParams::ServicePeriod::Iterations)).void
73+
}
74+
def initialize(interval: nil, interval_count: nil, iterations: nil); end
5275
end
5376
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
5477
sig { returns(T.nilable(Integer)) }

rbi/stripe/resources/coupon.rbi

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,31 @@ module Stripe
4747
end
4848
end
4949
class ServicePeriod < ::Stripe::StripeObject
50+
class Iterations < ::Stripe::StripeObject
51+
# Attribute for field count
52+
sig { returns(T.nilable(Integer)) }
53+
def count; end
54+
# Attribute for field type
55+
sig { returns(String) }
56+
def type; end
57+
def self.inner_class_types
58+
@inner_class_types = {}
59+
end
60+
def self.field_remappings
61+
@field_remappings = {}
62+
end
63+
end
5064
# Attribute for field interval
5165
sig { returns(String) }
5266
def interval; end
5367
# Attribute for field interval_count
5468
sig { returns(Integer) }
5569
def interval_count; end
70+
# Attribute for field iterations
71+
sig { returns(Iterations) }
72+
def iterations; end
5673
def self.inner_class_types
57-
@inner_class_types = {}
74+
@inner_class_types = {iterations: Iterations}
5875
end
5976
def self.field_remappings
6077
@field_remappings = {}

0 commit comments

Comments
 (0)