zavudev 0.8.0 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 717b455df0121d5069c0308c0f5550d0aa0873e6e2d007ade9e0cddfca2e740e
4
- data.tar.gz: a42d4f878526ab1c1eabd8997095ccb98bf738fa58d5895a2b0e0529a5547aa4
3
+ metadata.gz: f863076c4eeb49c713327290f14e2d36918b967a478d7c398bee1c121d4edbdb
4
+ data.tar.gz: a8ea9db0e53ec3f3a9e5baab6999dabb8e8c5859eeb0a648aa14f760cb84cda3
5
5
  SHA512:
6
- metadata.gz: 92b1dfc26805469609713c9fb8a6eb33e5d3e2854045ccba0c18ff7e9a1a0bfcf5577f58220b151b3d47cd74067b9ae9be09c628ab87a63648e53ff072ecea78
7
- data.tar.gz: a7420f018046aaed7c47bf1af2b02a53bf8714a93b6d2cba8b587ce3214d76223161bd09de5cea7aebc13e7f232371c1594869a21618a7a27e7e03fb3503f91f
6
+ metadata.gz: d49b887095d7bf82b0c6cbbacf09168ece3eafc78af476ef0fc054dd57b3f64386fdda92d32a8d841c2f34105c888bb33a6bbbeedac2eb7bcda87450fa2db303
7
+ data.tar.gz: 26d79fbabbd08a0cdd0aad71265acf892cc2f19a0669a268a7aa3d8e5b64b3e12e886cc59b55448c81c6bc3b80ec61be989f2883619584b8689214e4c00dd565
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0 (2026-05-01)
4
+
5
+ Full Changelog: [v0.8.0...v0.9.0](https://github.com/zavudev/sdk-ruby/compare/v0.8.0...v0.9.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([d62e533](https://github.com/zavudev/sdk-ruby/commit/d62e533c799998d1b0edb38f21a2eda84afa2d1a))
10
+ * support setting headers via env ([b901283](https://github.com/zavudev/sdk-ruby/commit/b9012834867f0411077528590553bdc10b5f0502))
11
+
3
12
  ## 0.8.0 (2026-04-27)
4
13
 
5
14
  Full Changelog: [v0.7.0...v0.8.0](https://github.com/zavudev/sdk-ruby/compare/v0.7.0...v0.8.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "zavudev", "~> 0.8.0"
29
+ gem "zavudev", "~> 0.9.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -106,6 +106,19 @@ module Zavudev
106
106
  raise ArgumentError.new("api_key is required, and can be set via environ: \"ZAVUDEV_API_KEY\"")
107
107
  end
108
108
 
109
+ headers = {}
110
+ custom_headers_env = ENV["ZAVUDEV_CUSTOM_HEADERS"]
111
+ unless custom_headers_env.nil?
112
+ parsed = {}
113
+ custom_headers_env.split("\n").each do |line|
114
+ colon = line.index(":")
115
+ unless colon.nil?
116
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
117
+ end
118
+ end
119
+ headers = parsed.merge(headers)
120
+ end
121
+
109
122
  @api_key = api_key.to_s
110
123
 
111
124
  super(
@@ -113,7 +126,8 @@ module Zavudev
113
126
  timeout: timeout,
114
127
  max_retries: max_retries,
115
128
  initial_retry_delay: initial_retry_delay,
116
- max_retry_delay: max_retry_delay
129
+ max_retry_delay: max_retry_delay,
130
+ headers: headers
117
131
  )
118
132
 
119
133
  @messages = Zavudev::Resources::Messages.new(client: self)
@@ -4,7 +4,8 @@ module Zavudev
4
4
  module Resources
5
5
  class SubAccounts
6
6
  class APIKeys
7
- # Create sub-account API key
7
+ # Create sub-account API key. Requires a parent project API key; sub-account API
8
+ # keys receive HTTP 403.
8
9
  #
9
10
  # @overload create(id, name:, environment: nil, permissions: nil, request_options: {})
10
11
  #
@@ -32,7 +33,8 @@ module Zavudev
32
33
  )
33
34
  end
34
35
 
35
- # List sub-account API keys
36
+ # List sub-account API keys. Requires a parent project API key; sub-account API
37
+ # keys receive HTTP 403.
36
38
  #
37
39
  # @overload list(id, request_options: {})
38
40
  #
@@ -52,7 +54,8 @@ module Zavudev
52
54
  )
53
55
  end
54
56
 
55
- # Revoke sub-account API key
57
+ # Revoke sub-account API key. Requires a parent project API key; sub-account API
58
+ # keys receive HTTP 403.
56
59
  #
57
60
  # @overload revoke(key_id, id:, request_options: {})
58
61
  #
@@ -11,7 +11,8 @@ module Zavudev
11
11
  #
12
12
  # Create a new sub-account (project) with its own API key. All charges are billed
13
13
  # to the parent team's balance. Use creditLimit to set a spending cap. The
14
- # sub-account's API key is returned only in the creation response.
14
+ # sub-account's API key is returned only in the creation response. Requires a
15
+ # parent project API key; sub-account API keys receive HTTP 403.
15
16
  #
16
17
  # @overload create(name:, credit_limit: nil, external_id: nil, metadata: nil, request_options: {})
17
18
  #
@@ -39,7 +40,8 @@ module Zavudev
39
40
  )
40
41
  end
41
42
 
42
- # Get sub-account
43
+ # Get sub-account. Requires a parent project API key; sub-account API keys receive
44
+ # HTTP 403.
43
45
  #
44
46
  # @overload retrieve(id, request_options: {})
45
47
  #
@@ -59,7 +61,8 @@ module Zavudev
59
61
  )
60
62
  end
61
63
 
62
- # Update sub-account
64
+ # Update sub-account. Requires a parent project API key; sub-account API keys
65
+ # receive HTTP 403.
63
66
  #
64
67
  # @overload update(id, credit_limit: nil, external_id: nil, metadata: nil, name: nil, status: nil, request_options: {})
65
68
  #
@@ -91,7 +94,8 @@ module Zavudev
91
94
  )
92
95
  end
93
96
 
94
- # List sub-accounts for this team.
97
+ # List sub-accounts for this team. Requires a parent project API key; sub-account
98
+ # API keys receive HTTP 403.
95
99
  #
96
100
  # @overload list(cursor: nil, limit: nil, request_options: {})
97
101
  #
@@ -116,7 +120,8 @@ module Zavudev
116
120
  end
117
121
 
118
122
  # Deactivate a sub-account. Remaining balance is returned to the parent team and
119
- # all API keys are revoked.
123
+ # all API keys are revoked. Requires a parent project API key; sub-account API
124
+ # keys receive HTTP 403.
120
125
  #
121
126
  # @overload deactivate(id, request_options: {})
122
127
  #
@@ -137,7 +142,8 @@ module Zavudev
137
142
  end
138
143
 
139
144
  # Get spending information for a sub-account. Returns the parent team's balance,
140
- # the sub-account's total spending, and its credit limit (spending cap).
145
+ # the sub-account's total spending, and its credit limit (spending cap). Requires
146
+ # a parent project API key; sub-account API keys receive HTTP 403.
141
147
  #
142
148
  # @overload get_balance(id, request_options: {})
143
149
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zavudev
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
@@ -4,7 +4,8 @@ module Zavudev
4
4
  module Resources
5
5
  class SubAccounts
6
6
  class APIKeys
7
- # Create sub-account API key
7
+ # Create sub-account API key. Requires a parent project API key; sub-account API
8
+ # keys receive HTTP 403.
8
9
  sig do
9
10
  params(
10
11
  id: String,
@@ -25,7 +26,8 @@ module Zavudev
25
26
  )
26
27
  end
27
28
 
28
- # List sub-account API keys
29
+ # List sub-account API keys. Requires a parent project API key; sub-account API
30
+ # keys receive HTTP 403.
29
31
  sig do
30
32
  params(
31
33
  id: String,
@@ -39,7 +41,8 @@ module Zavudev
39
41
  )
40
42
  end
41
43
 
42
- # Revoke sub-account API key
44
+ # Revoke sub-account API key. Requires a parent project API key; sub-account API
45
+ # keys receive HTTP 403.
43
46
  sig do
44
47
  params(
45
48
  key_id: String,
@@ -8,7 +8,8 @@ module Zavudev
8
8
 
9
9
  # Create a new sub-account (project) with its own API key. All charges are billed
10
10
  # to the parent team's balance. Use creditLimit to set a spending cap. The
11
- # sub-account's API key is returned only in the creation response.
11
+ # sub-account's API key is returned only in the creation response. Requires a
12
+ # parent project API key; sub-account API keys receive HTTP 403.
12
13
  sig do
13
14
  params(
14
15
  name: String,
@@ -31,7 +32,8 @@ module Zavudev
31
32
  )
32
33
  end
33
34
 
34
- # Get sub-account
35
+ # Get sub-account. Requires a parent project API key; sub-account API keys receive
36
+ # HTTP 403.
35
37
  sig do
36
38
  params(
37
39
  id: String,
@@ -45,7 +47,8 @@ module Zavudev
45
47
  )
46
48
  end
47
49
 
48
- # Update sub-account
50
+ # Update sub-account. Requires a parent project API key; sub-account API keys
51
+ # receive HTTP 403.
49
52
  sig do
50
53
  params(
51
54
  id: String,
@@ -69,7 +72,8 @@ module Zavudev
69
72
  )
70
73
  end
71
74
 
72
- # List sub-accounts for this team.
75
+ # List sub-accounts for this team. Requires a parent project API key; sub-account
76
+ # API keys receive HTTP 403.
73
77
  sig do
74
78
  params(
75
79
  cursor: String,
@@ -81,7 +85,8 @@ module Zavudev
81
85
  end
82
86
 
83
87
  # Deactivate a sub-account. Remaining balance is returned to the parent team and
84
- # all API keys are revoked.
88
+ # all API keys are revoked. Requires a parent project API key; sub-account API
89
+ # keys receive HTTP 403.
85
90
  sig do
86
91
  params(
87
92
  id: String,
@@ -96,7 +101,8 @@ module Zavudev
96
101
  end
97
102
 
98
103
  # Get spending information for a sub-account. Returns the parent team's balance,
99
- # the sub-account's total spending, and its credit limit (spending cap).
104
+ # the sub-account's total spending, and its credit limit (spending cap). Requires
105
+ # a parent project API key; sub-account API keys receive HTTP 403.
100
106
  sig do
101
107
  params(
102
108
  id: String,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zavudev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zavudev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-27 00:00:00.000000000 Z
11
+ date: 2026-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi