gigachat-ruby 0.1.0 → 0.1.1

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: 2b0549b3d0c559ef154e36cfaa3fed6592068cdfbcf50e5fa29bda9d9167d8e2
4
- data.tar.gz: 4264f7de916a13286744a74e2a8dec78c7e1b766dfcc0237d377352094b8ee34
3
+ metadata.gz: 78c6d32e2190d2fe8549174536d3b659a98f9c5b2e1471638a807750f375b5c9
4
+ data.tar.gz: d937faa30b6007f3263a45053277810006ff5992bc626c59f31dbf4740221886
5
5
  SHA512:
6
- metadata.gz: 51bb690904f272e089051596a55d8d2f6cf558e96c5c9082cf10065a2c5c7bdef069602c556e6a37c507e5b8c6702f0a370dab263c8800eb5b9c94aa4212098d
7
- data.tar.gz: f27d1bfa89ed131c70f46633927fbd90e446f72c183675487cdf52eb841e003dbff825ebdf899bc69b19330d1b5de86e2bbfdcfa17d7cd6c473d3ebc27f00262
6
+ metadata.gz: 932dd4fdb2a79f8ebed405f7f46de5045f8c93404d1d3a21e969647f7628a5a10f7772963a99b73be53591ee4c52471223b988cb5eb988523f8e966826bfc516
7
+ data.tar.gz: d117c6b67bc49fa12c85c63c74a89f92713f65c9f9e0182f2cd68e856cc5c28c365c279bb060c767ccad9f6cd0392973f571fc3a07df0cc4be330b118bca46c0
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.1.1] - 2026-10-02
8
+
9
+ ### Added
10
+
11
+ - `GigaChat::PaymentRequiredError` for HTTP 402 (token balance exhausted). The OpenAPI spec doesn't list
12
+ this status, but the API returns it in practice.
13
+
7
14
  ## [0.1.0] - 2026-10-02
8
15
 
9
16
  ### Added
data/README.md CHANGED
@@ -248,6 +248,7 @@ The API's `method` field is exposed as `batch_method`, because a `method` reader
248
248
  |---|---|
249
249
  | 400 | `GigaChat::BadRequestError` |
250
250
  | 401 | `GigaChat::AuthenticationError` |
251
+ | 402 | `GigaChat::PaymentRequiredError` (token balance exhausted) |
251
252
  | 403 | `GigaChat::PermissionDeniedError` |
252
253
  | 404 | `GigaChat::NotFoundError` |
253
254
  | 413 | `GigaChat::RequestEntityTooLargeError` |
@@ -27,9 +27,9 @@ module GigaChat
27
27
  return ServerError if status >= 500
28
28
 
29
29
  {
30
- 400 => BadRequestError, 401 => AuthenticationError, 403 => PermissionDeniedError,
31
- 404 => NotFoundError, 413 => RequestEntityTooLargeError, 422 => UnprocessableEntityError,
32
- 429 => RateLimitError
30
+ 400 => BadRequestError, 401 => AuthenticationError, 402 => PaymentRequiredError,
31
+ 403 => PermissionDeniedError, 404 => NotFoundError, 413 => RequestEntityTooLargeError,
32
+ 422 => UnprocessableEntityError, 429 => RateLimitError
33
33
  }.fetch(status, APIError)
34
34
  end
35
35
 
@@ -60,6 +60,9 @@ module GigaChat
60
60
 
61
61
  class AuthenticationError < APIError; end
62
62
 
63
+ # 402: the token balance is exhausted. Not in the OpenAPI spec, but returned in practice.
64
+ class PaymentRequiredError < APIError; end
65
+
63
66
  class PermissionDeniedError < APIError; end
64
67
 
65
68
  class NotFoundError < APIError; end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GigaChat
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gigachat-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksandr Dryzhuk