inttegro 1.0.0 → 3.0.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/Dockerfile +1 -1
  4. data/README.md +9 -7
  5. data/SECURITY.md +11 -0
  6. data/lib/inttegro/enums.rb +2 -2
  7. data/lib/inttegro/file_download.rb +1 -1
  8. data/lib/inttegro/generated/enums.rb +221 -329
  9. data/lib/inttegro/generated/models.rb +3707 -3830
  10. data/lib/inttegro/generated/operations.rb +230 -230
  11. data/lib/inttegro/http_client.rb +62 -5
  12. data/lib/inttegro/models.rb +54 -105
  13. data/lib/inttegro/resources/apps.rb +3 -3
  14. data/lib/inttegro/resources/balance_transactions.rb +2 -6
  15. data/lib/inttegro/resources/balances.rb +1 -1
  16. data/lib/inttegro/resources/broadcasts.rb +2 -6
  17. data/lib/inttegro/resources/chimes.rb +5 -5
  18. data/lib/inttegro/resources/customers.rb +4 -4
  19. data/lib/inttegro/resources/file_links.rb +4 -6
  20. data/lib/inttegro/resources/file_references.rb +1 -1
  21. data/lib/inttegro/resources/files.rb +4 -6
  22. data/lib/inttegro/resources/financial_accounts.rb +22 -22
  23. data/lib/inttegro/resources/keys.rb +8 -10
  24. data/lib/inttegro/resources/message_templates.rb +13 -15
  25. data/lib/inttegro/resources/orders.rb +72 -69
  26. data/lib/inttegro/resources/otp.rb +4 -4
  27. data/lib/inttegro/resources/payment_methods.rb +34 -36
  28. data/lib/inttegro/resources/payouts.rb +28 -28
  29. data/lib/inttegro/resources/prices.rb +7 -7
  30. data/lib/inttegro/resources/products.rb +9 -9
  31. data/lib/inttegro/resources/purchase_intents.rb +8 -8
  32. data/lib/inttegro/resources/refunds.rb +6 -6
  33. data/lib/inttegro/resources/schedules.rb +4 -4
  34. data/lib/inttegro/resources/spec.rb +1 -1
  35. data/lib/inttegro/resources/upload_requests.rb +10 -10
  36. data/lib/inttegro/response_object.rb +1 -1
  37. data/lib/inttegro/version.rb +1 -1
  38. data/lib/inttegro.rb +15 -0
  39. data/rbi/inttegro/generated.rbi +124 -124
  40. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 840b8af59190645ef6ac41b2ef017921552f43eafff04432ddfbb727084b3c80
4
- data.tar.gz: 3a74759e94a33b8f7422c2c2e9ee75a8c32d96f21b58431b965e0baeb62783c8
3
+ metadata.gz: 86aaca2f568691405e711ebfdad6701262661cc327819659ad81451c057516b8
4
+ data.tar.gz: b1393f51a00c5b82956860989d4280f884c5ce47c88d270272a4f1c6804f9396
5
5
  SHA512:
6
- metadata.gz: e83ba193e1b1a1557f2c1202455c748475a09619be837f1d9d1a709b122b24b883ccb807b9ab4f57b731a0aaf94a1845019523de5f0e47ac54c570f051357557
7
- data.tar.gz: 6cd7e942dff74db2a5f50eb841f8baefd2bf95d36df621fef4639b96401cdbc8ca95a8c5ae81c8441216770499cb21fc13019bd0b66ef1355d0a54c9539ed3d1
6
+ metadata.gz: 16f8a0f9333e5ad57b5b48673e868ab4e30f81112a8e5840aea46c25493d263faf7e9cdb6f87ba665b1aaf49c63c3f7303eff2d915b64be3c1baa08699f3e70e
7
+ data.tar.gz: 88071351d8411130be95d493810dc358cbabbf4b075b483b768418dd1a7de68a94dcf976a88e8c1d7d55a03d0bb827daa7b4fb0ddc2a769d5420e6941b5f82bc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [3.0.0] - 2026-09-03
4
+
5
+ - Breaking: resource methods now unwrap transport payloads and return domain objects and pages directly.
6
+ - Hid response and envelope classes from the public constant surface and replaced response-oriented nested financial-account names.
7
+ - Removed the explicit `Enums` namespace and exposed enum types directly from `Inttegro`.
8
+
9
+ ## [2.0.0] - 2026-09-02
10
+
11
+ - Breaking: moved generated request, response, and domain types from `Inttegro::Models` to `Inttegro`.
12
+ - Breaking: moved generated enum types from `Inttegro::Enums` to `Inttegro`.
13
+ - Renamed the generated API error schema to `Inttegro::ErrorPayload` to avoid colliding with the SDK exception.
14
+
3
15
  ## [1.0.0] - 2026-09-01
4
16
 
5
17
  - Breaking: rename the gem, root module, require paths, and generated RBI namespace to `inttegro` and `Inttegro`.
data/Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # syntax=docker/dockerfile:1.7
2
2
 
3
- FROM ruby:3.3-alpine AS base
3
+ FROM ruby:3.3-alpine@sha256:2f763b37070564bb00b736f1d4dba6e8f8d203b5f93b94463879fd8d79966f28 AS base
4
4
  WORKDIR /app
5
5
  RUN apk add --no-cache build-base git
6
6
  COPY Gemfile Gemfile.lock inttegro.gemspec Rakefile ./
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Inttegro Ruby SDK
2
2
 
3
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/zebodotdev/inttegro-sdk-ruby/badge)](https://scorecard.dev/viewer/?uri=github.com/zebodotdev/inttegro-sdk-ruby)
4
+
3
5
  The official Ruby client for building server-side Inttegro integrations.
4
6
 
5
7
  > **Fastest, most modern path:** connect an agent to [Inttegro MCP](https://studio.inttegro.com/inttegro-mcp) at `https://mcp.inttegro.com`, then ask it to run `design_integration`. It will produce an implementation and test plan for your application. Use this SDK when you are ready to connect that plan to your Ruby service.
@@ -34,7 +36,7 @@ require "inttegro"
34
36
  inttegro = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
35
37
 
36
38
  begin
37
- result = inttegro.orders.create(
39
+ order = inttegro.orders.create(
38
40
  request_meta: { idempotency_key: "checkout-cart-123" },
39
41
  customer_data: {
40
42
  name: "Akua Mensah",
@@ -49,7 +51,7 @@ begin
49
51
  line_items: [{
50
52
  type: "product",
51
53
  product: {
52
- type: Inttegro::Enums::ProductType::DIGITAL,
54
+ type: Inttegro::ProductType::DIGITAL,
53
55
  name: "Monthly subscription",
54
56
  quantity: 1,
55
57
  price: { currency: "ghs", value: 5000 }
@@ -57,9 +59,9 @@ begin
57
59
  }]
58
60
  )
59
61
 
60
- checkout_url = result.order.invoice&.format_value&.web&.url
62
+ checkout_url = order.invoice&.format_value&.web&.url
61
63
  raise "Order did not include a checkout URL" unless checkout_url
62
- puts "#{result.order.id} #{checkout_url}"
64
+ puts "#{order.id} #{checkout_url}"
63
65
  rescue Inttegro::APIError => error
64
66
  warn "#{error.code || 'api_error'}: #{error.detail || error.message}"
65
67
  raise
@@ -75,12 +77,12 @@ The SDK covers orders and checkout, customers, products and prices, purchase int
75
77
  Ruby-specific features:
76
78
 
77
79
  - `typed: strict` throughout the gem with signatures on every method.
78
- - OpenAPI-generated `T::Struct` request and response models for exact resource shapes.
80
+ - OpenAPI-generated `T::Struct` request and domain models for exact resource shapes.
79
81
  - OpenAPI-generated `T::Enum` classes for public API values.
80
82
  - Typed resource methods, binary downloads, and public RBI files included in the gem.
81
83
  - Configurable connection/read timeouts and an injectable adapter for tests.
82
84
 
83
- Hash request payloads remain available for concise Ruby code. Sorbet applications can use the generated classes under `Inttegro::Models` when they want construction-time field checks.
85
+ Hash request payloads remain available for concise Ruby code. Sorbet applications can use the generated classes under `Inttegro` when they want construction-time field checks.
84
86
 
85
87
  See the [API reference](https://studio.inttegro.com/api-reference) for request fields and lifecycle rules, [errors](https://studio.inttegro.com/errors) for recovery guidance, and [idempotency](https://studio.inttegro.com/idempotency) for safe retries.
86
88
 
@@ -90,7 +92,7 @@ The GitHub release for each version is the canonical record. It contains the exa
90
92
 
91
93
  ```bash
92
94
  sha256sum --check SHA256SUMS
93
- gh attestation verify inttegro-1.0.0.gem \
95
+ gh attestation verify inttegro-2.0.0.gem \
94
96
  --repo zebodotdev/inttegro-sdk-ruby
95
97
  ```
96
98
 
data/SECURITY.md ADDED
@@ -0,0 +1,11 @@
1
+ # Security Policy
2
+
3
+ ## Supported versions
4
+
5
+ Security fixes are released for the latest published version of the SDK. Users should upgrade to the newest release before reporting an issue that may already be fixed.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Do not open a public issue for a suspected vulnerability. Use [GitHub's private vulnerability reporting](https://github.com/zebodotdev/inttegro-sdk-ruby/security/advisories/new) and include the affected version, impact, reproduction steps, and any suggested remediation.
10
+
11
+ We will acknowledge the report, investigate it privately, and coordinate disclosure after a fix is available.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  # typed: strict
3
3
 
4
- # Public enum classes are generated directly from the OpenAPI contract. Each
5
- # constant is a T::Enum value; call #serialize when a raw wire value is needed.
4
+ # Public enum classes are generated directly under Inttegro from the OpenAPI
5
+ # contract. Each constant is a T::Enum value; call #serialize for a wire value.
6
6
  require_relative "generated/enums"
@@ -23,7 +23,7 @@ module Inttegro
23
23
 
24
24
  sig { params(path: String).returns(Integer) }
25
25
  def save_to(path)
26
- File.binwrite(path, data)
26
+ ::File.binwrite(path, data)
27
27
  end
28
28
  end
29
29
  end