openai 0.71.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/organization_spend_limit.rb +151 -0
- data/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb +33 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit.rb +155 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb +35 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_delete_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_retrieve_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb +77 -0
- data/lib/openai/models/admin/organization/spend_limit_delete_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_retrieve_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_update_params.rb +67 -0
- data/lib/openai/models/beta/beta_response.rb +12 -6
- data/lib/openai/models/beta/beta_response_error.rb +1 -0
- data/lib/openai/models/beta/beta_response_text_config.rb +4 -2
- data/lib/openai/models/beta/beta_responses_client_event.rb +12 -6
- data/lib/openai/models/beta/response_create_params.rb +12 -6
- data/lib/openai/models/beta/responses/input_token_count_params.rb +12 -4
- data/lib/openai/models/chat/completion_create_params.rb +8 -6
- data/lib/openai/models/reasoning.rb +8 -2
- data/lib/openai/models/responses/input_token_count_params.rb +4 -2
- data/lib/openai/models/responses/response.rb +4 -4
- data/lib/openai/models/responses/response_create_params.rb +4 -4
- data/lib/openai/models/responses/response_error.rb +1 -0
- data/lib/openai/models/responses/response_text_config.rb +4 -2
- data/lib/openai/models/responses/responses_client_event.rb +4 -4
- data/lib/openai/resources/admin/organization/projects/spend_limit.rb +95 -0
- data/lib/openai/resources/admin/organization/projects.rb +4 -0
- data/lib/openai/resources/admin/organization/spend_limit.rb +86 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/beta/responses.rb +4 -4
- data/lib/openai/resources/chat/completions.rb +4 -4
- data/lib/openai/resources/responses.rb +4 -4
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +12 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit.rbi +278 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit_deleted.rbi +48 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit.rbi +280 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit_deleted.rbi +49 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_delete_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_update_params.rbi +149 -0
- data/rbi/openai/models/admin/organization/spend_limit_delete_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_retrieve_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_update_params.rbi +141 -0
- data/rbi/openai/models/beta/beta_response.rbi +18 -15
- data/rbi/openai/models/beta/beta_response_error.rbi +5 -0
- data/rbi/openai/models/beta/beta_response_text_config.rbi +6 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +18 -15
- data/rbi/openai/models/beta/response_create_params.rbi +18 -15
- data/rbi/openai/models/beta/responses/input_token_count_params.rbi +18 -6
- data/rbi/openai/models/chat/completion_create_params.rbi +12 -15
- data/rbi/openai/models/reasoning.rbi +12 -3
- data/rbi/openai/models/responses/input_token_count_params.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +6 -12
- data/rbi/openai/models/responses/response_create_params.rbi +6 -12
- data/rbi/openai/models/responses/response_error.rbi +5 -0
- data/rbi/openai/models/responses/response_text_config.rbi +6 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -12
- data/rbi/openai/resources/admin/organization/projects/spend_limit.rbi +78 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +7 -0
- data/rbi/openai/resources/admin/organization/spend_limit.rbi +57 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/beta/responses.rbi +4 -4
- data/rbi/openai/resources/chat/completions.rbi +8 -6
- data/rbi/openai/resources/responses.rbi +4 -4
- data/sig/openai/models/admin/organization/organization_spend_limit.rbs +94 -0
- data/sig/openai/models/admin/organization/organization_spend_limit_deleted.rbs +28 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +96 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit_deleted.rbs +30 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_delete_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +67 -0
- data/sig/openai/models/admin/organization/spend_limit_delete_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_retrieve_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +60 -0
- data/sig/openai/models/beta/beta_response.rbs +8 -12
- data/sig/openai/models/beta/beta_response_error.rbs +2 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -12
- data/sig/openai/models/beta/response_create_params.rbs +8 -12
- data/sig/openai/models/chat/completion_create_params.rbs +8 -12
- data/sig/openai/models/responses/response.rbs +8 -12
- data/sig/openai/models/responses/response_create_params.rbs +8 -12
- data/sig/openai/models/responses/response_error.rbs +2 -0
- data/sig/openai/models/responses/responses_client_event.rbs +8 -12
- data/sig/openai/resources/admin/organization/projects/spend_limit.rbs +31 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- data/sig/openai/resources/admin/organization/spend_limit.rbs +26 -0
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/beta/responses.rbs +4 -4
- data/sig/openai/resources/chat/completions.rbs +4 -4
- data/sig/openai/resources/responses.rbs +4 -4
- metadata +38 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c69be82ff7c2671977b57e52c949e6f97f7951d11c0534495d49a65ab346cef
|
|
4
|
+
data.tar.gz: 308aa3a93da2b57df7646e4a46cd39d185ec237fc8a13a4efec74719a53f6cc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ecb5fa9bec8fc7cbe7ae3a5a04c5e48effb4afdf84a679a25bc9cbea34b34001a8dc131ef92049f3e8c2ee098be3d32aaab648d1d159f8e472f4f2de39333d7
|
|
7
|
+
data.tar.gz: 4c3799a9ae330a796e7f1e37b547d31622a9e53f99fa49bddb92348ed533a14c35c8dca9640f61cac244badf436f90ebbf2eaf5117cf86f240c7c4894326bffb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.72.0 (2026-07-23)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.71.0...v0.72.0](https://github.com/openai/openai-ruby/compare/v0.71.0...v0.72.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** accept `None` for prompt_cache_key/safety_identifier ([dcff6be](https://github.com/openai/openai-ruby/commit/dcff6bee4daca61b24dd03096f4772c3d276c93d))
|
|
10
|
+
* **api:** add support for `spend_limit` admin apis ([06dff48](https://github.com/openai/openai-ruby/commit/06dff483232e08e59be550cf4432d319a36ede11))
|
|
11
|
+
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([da769b4](https://github.com/openai/openai-ruby/commit/da769b419c0d1d51af2ad471ac63fdf18705be5b))
|
|
12
|
+
|
|
3
13
|
## 0.71.0 (2026-07-17)
|
|
4
14
|
|
|
5
15
|
Full Changelog: [v0.70.0...v0.71.0](https://github.com/openai/openai-ruby/compare/v0.70.0...v0.71.0)
|
data/README.md
CHANGED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
# @see OpenAI::Resources::Admin::Organization::SpendLimit#retrieve
|
|
8
|
+
class OrganizationSpendLimit < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute currency
|
|
10
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
11
|
+
#
|
|
12
|
+
# @return [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Currency]
|
|
13
|
+
required :currency, union: -> { OpenAI::Admin::Organization::OrganizationSpendLimit::Currency }
|
|
14
|
+
|
|
15
|
+
# @!attribute enforcement
|
|
16
|
+
# The current enforcement state of the hard spend limit.
|
|
17
|
+
#
|
|
18
|
+
# @return [OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement]
|
|
19
|
+
required :enforcement, -> { OpenAI::Admin::Organization::OrganizationSpendLimit::Enforcement }
|
|
20
|
+
|
|
21
|
+
# @!attribute interval
|
|
22
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
23
|
+
# `month` is supported.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Interval]
|
|
26
|
+
required :interval, union: -> { OpenAI::Admin::Organization::OrganizationSpendLimit::Interval }
|
|
27
|
+
|
|
28
|
+
# @!attribute object
|
|
29
|
+
# The object type, which is always `organization.spend_limit`.
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, :"organization.spend_limit"]
|
|
32
|
+
required :object, const: :"organization.spend_limit"
|
|
33
|
+
|
|
34
|
+
# @!attribute threshold_amount
|
|
35
|
+
# The hard spend limit amount, in cents.
|
|
36
|
+
#
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
required :threshold_amount, Integer
|
|
39
|
+
|
|
40
|
+
# @!method initialize(currency:, enforcement:, interval:, threshold_amount:, object: :"organization.spend_limit")
|
|
41
|
+
# Some parameter documentations has been truncated, see
|
|
42
|
+
# {OpenAI::Models::Admin::Organization::OrganizationSpendLimit} for more details.
|
|
43
|
+
#
|
|
44
|
+
# Represents a hard spend limit configured at the organization level.
|
|
45
|
+
#
|
|
46
|
+
# @param currency [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Currency] The currency for the threshold amount. Currently, only `USD` is supported.
|
|
47
|
+
#
|
|
48
|
+
# @param enforcement [OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement] The current enforcement state of the hard spend limit.
|
|
49
|
+
#
|
|
50
|
+
# @param interval [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Interval] The time interval for evaluating spend against the threshold. Currently, only `m
|
|
51
|
+
#
|
|
52
|
+
# @param threshold_amount [Integer] The hard spend limit amount, in cents.
|
|
53
|
+
#
|
|
54
|
+
# @param object [Symbol, :"organization.spend_limit"] The object type, which is always `organization.spend_limit`.
|
|
55
|
+
|
|
56
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
57
|
+
#
|
|
58
|
+
# @see OpenAI::Models::Admin::Organization::OrganizationSpendLimit#currency
|
|
59
|
+
module Currency
|
|
60
|
+
extend OpenAI::Internal::Type::Union
|
|
61
|
+
|
|
62
|
+
variant String
|
|
63
|
+
|
|
64
|
+
variant const: -> { OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Currency::USD }
|
|
65
|
+
|
|
66
|
+
# @!method self.variants
|
|
67
|
+
# @return [Array(String, Symbol)]
|
|
68
|
+
|
|
69
|
+
define_sorbet_constant!(:Variants) do
|
|
70
|
+
T.type_alias { T.any(String, OpenAI::Admin::Organization::OrganizationSpendLimit::Currency::TaggedSymbol) }
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# @!group
|
|
74
|
+
|
|
75
|
+
USD = :USD
|
|
76
|
+
|
|
77
|
+
# @!endgroup
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# @see OpenAI::Models::Admin::Organization::OrganizationSpendLimit#enforcement
|
|
81
|
+
class Enforcement < OpenAI::Internal::Type::BaseModel
|
|
82
|
+
# @!attribute status
|
|
83
|
+
# Whether the hard spend limit is currently enforcing.
|
|
84
|
+
#
|
|
85
|
+
# @return [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement::Status]
|
|
86
|
+
required :status, union: -> { OpenAI::Admin::Organization::OrganizationSpendLimit::Enforcement::Status }
|
|
87
|
+
|
|
88
|
+
# @!method initialize(status:)
|
|
89
|
+
# The current enforcement state of the hard spend limit.
|
|
90
|
+
#
|
|
91
|
+
# @param status [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement::Status] Whether the hard spend limit is currently enforcing.
|
|
92
|
+
|
|
93
|
+
# Whether the hard spend limit is currently enforcing.
|
|
94
|
+
#
|
|
95
|
+
# @see OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement#status
|
|
96
|
+
module Status
|
|
97
|
+
extend OpenAI::Internal::Type::Union
|
|
98
|
+
|
|
99
|
+
variant String
|
|
100
|
+
|
|
101
|
+
variant const: -> { OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement::Status::INACTIVE }
|
|
102
|
+
|
|
103
|
+
variant const: -> { OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement::Status::ENFORCING }
|
|
104
|
+
|
|
105
|
+
# @!method self.variants
|
|
106
|
+
# @return [Array(String, Symbol)]
|
|
107
|
+
|
|
108
|
+
define_sorbet_constant!(:Variants) do
|
|
109
|
+
T.type_alias { T.any(String, OpenAI::Admin::Organization::OrganizationSpendLimit::Enforcement::Status::TaggedSymbol) }
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @!group
|
|
113
|
+
|
|
114
|
+
INACTIVE = :inactive
|
|
115
|
+
ENFORCING = :enforcing
|
|
116
|
+
|
|
117
|
+
# @!endgroup
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
122
|
+
# `month` is supported.
|
|
123
|
+
#
|
|
124
|
+
# @see OpenAI::Models::Admin::Organization::OrganizationSpendLimit#interval
|
|
125
|
+
module Interval
|
|
126
|
+
extend OpenAI::Internal::Type::Union
|
|
127
|
+
|
|
128
|
+
variant String
|
|
129
|
+
|
|
130
|
+
variant const: -> { OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Interval::MONTH }
|
|
131
|
+
|
|
132
|
+
# @!method self.variants
|
|
133
|
+
# @return [Array(String, Symbol)]
|
|
134
|
+
|
|
135
|
+
define_sorbet_constant!(:Variants) do
|
|
136
|
+
T.type_alias { T.any(String, OpenAI::Admin::Organization::OrganizationSpendLimit::Interval::TaggedSymbol) }
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @!group
|
|
140
|
+
|
|
141
|
+
MONTH = :month
|
|
142
|
+
|
|
143
|
+
# @!endgroup
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
OrganizationSpendLimit = Organization::OrganizationSpendLimit
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
# @see OpenAI::Resources::Admin::Organization::SpendLimit#delete
|
|
8
|
+
class OrganizationSpendLimitDeleted < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute deleted
|
|
10
|
+
# Whether the hard spend limit was deleted.
|
|
11
|
+
#
|
|
12
|
+
# @return [Boolean]
|
|
13
|
+
required :deleted, OpenAI::Internal::Type::Boolean
|
|
14
|
+
|
|
15
|
+
# @!attribute object
|
|
16
|
+
# The object type, which is always `organization.spend_limit.deleted`.
|
|
17
|
+
#
|
|
18
|
+
# @return [Symbol, :"organization.spend_limit.deleted"]
|
|
19
|
+
required :object, const: :"organization.spend_limit.deleted"
|
|
20
|
+
|
|
21
|
+
# @!method initialize(deleted:, object: :"organization.spend_limit.deleted")
|
|
22
|
+
# Confirmation payload returned after deleting an organization hard spend limit.
|
|
23
|
+
#
|
|
24
|
+
# @param deleted [Boolean] Whether the hard spend limit was deleted.
|
|
25
|
+
#
|
|
26
|
+
# @param object [Symbol, :"organization.spend_limit.deleted"] The object type, which is always `organization.spend_limit.deleted`.
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
OrganizationSpendLimitDeleted = Organization::OrganizationSpendLimitDeleted
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
module Projects
|
|
8
|
+
# @see OpenAI::Resources::Admin::Organization::Projects::SpendLimit#retrieve
|
|
9
|
+
class ProjectSpendLimit < OpenAI::Internal::Type::BaseModel
|
|
10
|
+
# @!attribute currency
|
|
11
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
12
|
+
#
|
|
13
|
+
# @return [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Currency]
|
|
14
|
+
required :currency, union: -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Currency }
|
|
15
|
+
|
|
16
|
+
# @!attribute enforcement
|
|
17
|
+
# The current enforcement state of the hard spend limit.
|
|
18
|
+
#
|
|
19
|
+
# @return [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement]
|
|
20
|
+
required :enforcement, -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement }
|
|
21
|
+
|
|
22
|
+
# @!attribute interval
|
|
23
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
24
|
+
# `month` is supported.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Interval]
|
|
27
|
+
required :interval, union: -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Interval }
|
|
28
|
+
|
|
29
|
+
# @!attribute object
|
|
30
|
+
# The object type, which is always `project.spend_limit`.
|
|
31
|
+
#
|
|
32
|
+
# @return [Symbol, :"project.spend_limit"]
|
|
33
|
+
required :object, const: :"project.spend_limit"
|
|
34
|
+
|
|
35
|
+
# @!attribute threshold_amount
|
|
36
|
+
# The hard spend limit amount, in cents.
|
|
37
|
+
#
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
required :threshold_amount, Integer
|
|
40
|
+
|
|
41
|
+
# @!method initialize(currency:, enforcement:, interval:, threshold_amount:, object: :"project.spend_limit")
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit} for more
|
|
44
|
+
# details.
|
|
45
|
+
#
|
|
46
|
+
# Represents a hard spend limit configured at the project level.
|
|
47
|
+
#
|
|
48
|
+
# @param currency [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Currency] The currency for the threshold amount. Currently, only `USD` is supported.
|
|
49
|
+
#
|
|
50
|
+
# @param enforcement [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement] The current enforcement state of the hard spend limit.
|
|
51
|
+
#
|
|
52
|
+
# @param interval [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Interval] The time interval for evaluating spend against the threshold. Currently, only `m
|
|
53
|
+
#
|
|
54
|
+
# @param threshold_amount [Integer] The hard spend limit amount, in cents.
|
|
55
|
+
#
|
|
56
|
+
# @param object [Symbol, :"project.spend_limit"] The object type, which is always `project.spend_limit`.
|
|
57
|
+
|
|
58
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
59
|
+
#
|
|
60
|
+
# @see OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit#currency
|
|
61
|
+
module Currency
|
|
62
|
+
extend OpenAI::Internal::Type::Union
|
|
63
|
+
|
|
64
|
+
variant String
|
|
65
|
+
|
|
66
|
+
variant const: -> { OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Currency::USD }
|
|
67
|
+
|
|
68
|
+
# @!method self.variants
|
|
69
|
+
# @return [Array(String, Symbol)]
|
|
70
|
+
|
|
71
|
+
define_sorbet_constant!(:Variants) do
|
|
72
|
+
T.type_alias { T.any(String, OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Currency::TaggedSymbol) }
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# @!group
|
|
76
|
+
|
|
77
|
+
USD = :USD
|
|
78
|
+
|
|
79
|
+
# @!endgroup
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @see OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit#enforcement
|
|
83
|
+
class Enforcement < OpenAI::Internal::Type::BaseModel
|
|
84
|
+
# @!attribute status
|
|
85
|
+
# Whether the hard spend limit is currently enforcing.
|
|
86
|
+
#
|
|
87
|
+
# @return [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status]
|
|
88
|
+
required :status,
|
|
89
|
+
union: -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status }
|
|
90
|
+
|
|
91
|
+
# @!method initialize(status:)
|
|
92
|
+
# The current enforcement state of the hard spend limit.
|
|
93
|
+
#
|
|
94
|
+
# @param status [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status] Whether the hard spend limit is currently enforcing.
|
|
95
|
+
|
|
96
|
+
# Whether the hard spend limit is currently enforcing.
|
|
97
|
+
#
|
|
98
|
+
# @see OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement#status
|
|
99
|
+
module Status
|
|
100
|
+
extend OpenAI::Internal::Type::Union
|
|
101
|
+
|
|
102
|
+
variant String
|
|
103
|
+
|
|
104
|
+
variant const: -> { OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status::INACTIVE }
|
|
105
|
+
|
|
106
|
+
variant const: -> { OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status::ENFORCING }
|
|
107
|
+
|
|
108
|
+
# @!method self.variants
|
|
109
|
+
# @return [Array(String, Symbol)]
|
|
110
|
+
|
|
111
|
+
define_sorbet_constant!(:Variants) do
|
|
112
|
+
T.type_alias { T.any(String, OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status::TaggedSymbol) }
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @!group
|
|
116
|
+
|
|
117
|
+
INACTIVE = :inactive
|
|
118
|
+
ENFORCING = :enforcing
|
|
119
|
+
|
|
120
|
+
# @!endgroup
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
125
|
+
# `month` is supported.
|
|
126
|
+
#
|
|
127
|
+
# @see OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit#interval
|
|
128
|
+
module Interval
|
|
129
|
+
extend OpenAI::Internal::Type::Union
|
|
130
|
+
|
|
131
|
+
variant String
|
|
132
|
+
|
|
133
|
+
variant const: -> { OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Interval::MONTH }
|
|
134
|
+
|
|
135
|
+
# @!method self.variants
|
|
136
|
+
# @return [Array(String, Symbol)]
|
|
137
|
+
|
|
138
|
+
define_sorbet_constant!(:Variants) do
|
|
139
|
+
T.type_alias { T.any(String, OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Interval::TaggedSymbol) }
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @!group
|
|
143
|
+
|
|
144
|
+
MONTH = :month
|
|
145
|
+
|
|
146
|
+
# @!endgroup
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
ProjectSpendLimit = Projects::ProjectSpendLimit
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
module Projects
|
|
8
|
+
# @see OpenAI::Resources::Admin::Organization::Projects::SpendLimit#delete
|
|
9
|
+
class ProjectSpendLimitDeleted < OpenAI::Internal::Type::BaseModel
|
|
10
|
+
# @!attribute deleted
|
|
11
|
+
# Whether the hard spend limit was deleted.
|
|
12
|
+
#
|
|
13
|
+
# @return [Boolean]
|
|
14
|
+
required :deleted, OpenAI::Internal::Type::Boolean
|
|
15
|
+
|
|
16
|
+
# @!attribute object
|
|
17
|
+
# The object type, which is always `project.spend_limit.deleted`.
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, :"project.spend_limit.deleted"]
|
|
20
|
+
required :object, const: :"project.spend_limit.deleted"
|
|
21
|
+
|
|
22
|
+
# @!method initialize(deleted:, object: :"project.spend_limit.deleted")
|
|
23
|
+
# Confirmation payload returned after deleting a project hard spend limit.
|
|
24
|
+
#
|
|
25
|
+
# @param deleted [Boolean] Whether the hard spend limit was deleted.
|
|
26
|
+
#
|
|
27
|
+
# @param object [Symbol, :"project.spend_limit.deleted"] The object type, which is always `project.spend_limit.deleted`.
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
ProjectSpendLimitDeleted = Projects::ProjectSpendLimitDeleted
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
module Projects
|
|
8
|
+
# @see OpenAI::Resources::Admin::Organization::Projects::SpendLimit#delete
|
|
9
|
+
class SpendLimitDeleteParams < OpenAI::Internal::Type::BaseModel
|
|
10
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
# @!attribute project_id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :project_id, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(project_id:, request_options: {})
|
|
19
|
+
# @param project_id [String]
|
|
20
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
module Projects
|
|
8
|
+
# @see OpenAI::Resources::Admin::Organization::Projects::SpendLimit#retrieve
|
|
9
|
+
class SpendLimitRetrieveParams < OpenAI::Internal::Type::BaseModel
|
|
10
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
# @!attribute project_id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :project_id, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(project_id:, request_options: {})
|
|
19
|
+
# @param project_id [String]
|
|
20
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
module Projects
|
|
8
|
+
# @see OpenAI::Resources::Admin::Organization::Projects::SpendLimit#update
|
|
9
|
+
class SpendLimitUpdateParams < OpenAI::Internal::Type::BaseModel
|
|
10
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
# @!attribute project_id
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :project_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute currency
|
|
19
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency]
|
|
22
|
+
required :currency, enum: -> { OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Currency }
|
|
23
|
+
|
|
24
|
+
# @!attribute interval
|
|
25
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
26
|
+
# `month` is supported.
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval]
|
|
29
|
+
required :interval, enum: -> { OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Interval }
|
|
30
|
+
|
|
31
|
+
# @!attribute threshold_amount
|
|
32
|
+
# The hard spend limit amount, in cents.
|
|
33
|
+
#
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
required :threshold_amount, Integer
|
|
36
|
+
|
|
37
|
+
# @!method initialize(project_id:, currency:, interval:, threshold_amount:, request_options: {})
|
|
38
|
+
# Some parameter documentations has been truncated, see
|
|
39
|
+
# {OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams} for more
|
|
40
|
+
# details.
|
|
41
|
+
#
|
|
42
|
+
# @param project_id [String]
|
|
43
|
+
#
|
|
44
|
+
# @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported.
|
|
45
|
+
#
|
|
46
|
+
# @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m
|
|
47
|
+
#
|
|
48
|
+
# @param threshold_amount [Integer] The hard spend limit amount, in cents.
|
|
49
|
+
#
|
|
50
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
51
|
+
|
|
52
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
53
|
+
module Currency
|
|
54
|
+
extend OpenAI::Internal::Type::Enum
|
|
55
|
+
|
|
56
|
+
USD = :USD
|
|
57
|
+
|
|
58
|
+
# @!method self.values
|
|
59
|
+
# @return [Array<Symbol>]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
63
|
+
# `month` is supported.
|
|
64
|
+
module Interval
|
|
65
|
+
extend OpenAI::Internal::Type::Enum
|
|
66
|
+
|
|
67
|
+
MONTH = :month
|
|
68
|
+
|
|
69
|
+
# @!method self.values
|
|
70
|
+
# @return [Array<Symbol>]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
# @see OpenAI::Resources::Admin::Organization::SpendLimit#delete
|
|
8
|
+
class SpendLimitDeleteParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!method initialize(request_options: {})
|
|
13
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
# @see OpenAI::Resources::Admin::Organization::SpendLimit#retrieve
|
|
8
|
+
class SpendLimitRetrieveParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!method initialize(request_options: {})
|
|
13
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Admin
|
|
6
|
+
module Organization
|
|
7
|
+
# @see OpenAI::Resources::Admin::Organization::SpendLimit#update
|
|
8
|
+
class SpendLimitUpdateParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute currency
|
|
13
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Currency]
|
|
16
|
+
required :currency, enum: -> { OpenAI::Admin::Organization::SpendLimitUpdateParams::Currency }
|
|
17
|
+
|
|
18
|
+
# @!attribute interval
|
|
19
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
20
|
+
# `month` is supported.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Interval]
|
|
23
|
+
required :interval, enum: -> { OpenAI::Admin::Organization::SpendLimitUpdateParams::Interval }
|
|
24
|
+
|
|
25
|
+
# @!attribute threshold_amount
|
|
26
|
+
# The hard spend limit amount, in cents.
|
|
27
|
+
#
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
required :threshold_amount, Integer
|
|
30
|
+
|
|
31
|
+
# @!method initialize(currency:, interval:, threshold_amount:, request_options: {})
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {OpenAI::Models::Admin::Organization::SpendLimitUpdateParams} for more details.
|
|
34
|
+
#
|
|
35
|
+
# @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported.
|
|
36
|
+
#
|
|
37
|
+
# @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m
|
|
38
|
+
#
|
|
39
|
+
# @param threshold_amount [Integer] The hard spend limit amount, in cents.
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
42
|
+
|
|
43
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
44
|
+
module Currency
|
|
45
|
+
extend OpenAI::Internal::Type::Enum
|
|
46
|
+
|
|
47
|
+
USD = :USD
|
|
48
|
+
|
|
49
|
+
# @!method self.values
|
|
50
|
+
# @return [Array<Symbol>]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
54
|
+
# `month` is supported.
|
|
55
|
+
module Interval
|
|
56
|
+
extend OpenAI::Internal::Type::Enum
|
|
57
|
+
|
|
58
|
+
MONTH = :month
|
|
59
|
+
|
|
60
|
+
# @!method self.values
|
|
61
|
+
# @return [Array<Symbol>]
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|