inttegro 3.0.1 → 4.2.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 +4 -4
- data/CHANGELOG.md +27 -0
- data/README.md +19 -2
- data/lib/inttegro/client.rb +9 -3
- data/lib/inttegro/generated/enums.rb +68 -14
- data/lib/inttegro/generated/models.rb +358 -207
- data/lib/inttegro/generated/operations.rb +13 -1
- data/lib/inttegro/http_client.rb +101 -63
- data/lib/inttegro/models.rb +52 -0
- data/lib/inttegro/resources/orders.rb +1 -1
- data/lib/inttegro/resources/prices.rb +6 -6
- data/lib/inttegro/resources/products.rb +1 -1
- data/lib/inttegro/resources/upload_requests.rb +2 -1
- data/lib/inttegro/telemetry.rb +156 -0
- data/lib/inttegro/version.rb +1 -1
- data/rbi/inttegro/generated.rbi +7 -7
- data/rbi/opentelemetry-api.rbi +77 -0
- metadata +18 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b60affd2f9bc5ce1556ec7aeeacc26d0d52604d964df3c0ffd72ae034800130
|
|
4
|
+
data.tar.gz: 93520c2c26b96c4292eace71528343cd5ff5f33039e563132c3161d07dce03fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42d25f00a4b8d6ce066f044b2572fd31f3a49aaac7fb98085817673816695b2b69cb83e93e1381c685a5da73236cc9c663e8e493ab3e3118e28698b7e22e1cf9
|
|
7
|
+
data.tar.gz: 22b17729fa018888d51fc33945536a6624298f1b8b66a6a2599b3009fce8a79575e574dc4caefc531535e5812c64b397ce87ebd5f3eff908307890a12934f830
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [4.2.1] - 2026-09-04
|
|
4
|
+
|
|
5
|
+
- Aligned the SDK parity test with hosted-checkout routes that are intentionally handled by the client.
|
|
6
|
+
- Refreshed generated declarations from the OpenAPI commit pinned by CI and release automation.
|
|
7
|
+
|
|
8
|
+
## [4.2.0] - 2026-09-04
|
|
9
|
+
|
|
10
|
+
- Added vendor-neutral OpenTelemetry spans for logical SDK operations, HTTP attempts, response receipt, decoding, and safe failure categories.
|
|
11
|
+
- Added W3C trace-context propagation plus global or per-client tracer-provider configuration.
|
|
12
|
+
- Kept request bodies, credentials, resource identifiers, dynamic URLs, and exception details out of telemetry.
|
|
13
|
+
|
|
14
|
+
## [4.1.0] - 2026-09-03
|
|
15
|
+
|
|
16
|
+
- Added focused `Inttegro::Wallets` and `Inttegro::BankAccounts` modules for financial-account variants.
|
|
17
|
+
- Preserved the generated root constants for compatibility.
|
|
18
|
+
|
|
19
|
+
## [4.0.2] - 2026-09-03
|
|
20
|
+
|
|
21
|
+
- Normalize legacy uppercase currency values when decoding typed amount responses while keeping lowercase wire values for requests.
|
|
22
|
+
- Restore the product identifier on typed catalog-price responses.
|
|
23
|
+
|
|
24
|
+
## [4.0.1] - 2026-09-03
|
|
25
|
+
|
|
26
|
+
- Breaking: renamed order-prefixed payment models to semantic payment domain types.
|
|
27
|
+
- Added focused `Inttegro::Money` access for amount types and separated request and response price shapes.
|
|
28
|
+
- Kept generated transport response and envelope constants private while resource methods return domain objects directly.
|
|
29
|
+
|
|
3
30
|
## [3.0.1] - 2026-09-03
|
|
4
31
|
|
|
5
32
|
- Corrected the release-verification example to reference the current package version.
|
data/README.md
CHANGED
|
@@ -54,7 +54,10 @@ begin
|
|
|
54
54
|
type: Inttegro::ProductType::DIGITAL,
|
|
55
55
|
name: "Monthly subscription",
|
|
56
56
|
quantity: 1,
|
|
57
|
-
price:
|
|
57
|
+
price: Inttegro::PriceParams.new(
|
|
58
|
+
currency: Inttegro::Money::Currency::GHS,
|
|
59
|
+
value: 5000
|
|
60
|
+
)
|
|
58
61
|
}
|
|
59
62
|
}]
|
|
60
63
|
)
|
|
@@ -70,6 +73,20 @@ end
|
|
|
70
73
|
|
|
71
74
|
Amounts use integer minor units: `5000` GHS is GHS 50.00. Reuse the same idempotency key when retrying the same logical write. If you omit one, the SDK generates a UUIDv7 key for mutating calls.
|
|
72
75
|
|
|
76
|
+
## Observe SDK operations
|
|
77
|
+
|
|
78
|
+
The SDK emits vendor-neutral OpenTelemetry spans through your application's provider. It never configures an exporter or sends telemetry by itself. Configure OpenTelemetry before creating the client:
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
require "opentelemetry/sdk"
|
|
82
|
+
require "inttegro"
|
|
83
|
+
|
|
84
|
+
OpenTelemetry::SDK.configure
|
|
85
|
+
inttegro = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Spans are named after logical operations such as `inttegro.orders.create`. HTTP attempts, response receipt, and decoding are span events. API keys, bodies, resource IDs, dynamic URLs, and exception messages are never recorded. See [SDK observability](https://studio.inttegro.com/sdk-observability) for the complete contract and set `telemetry_enabled: false` when needed.
|
|
89
|
+
|
|
73
90
|
## Work with the API
|
|
74
91
|
|
|
75
92
|
The SDK covers orders and checkout, customers, products and prices, purchase intents, payment methods, balances, payouts and refunds, notifications, files, application settings, keys, and country specifications. Resources use snake-case readers such as `purchase_intents` and `payment_methods`.
|
|
@@ -92,7 +109,7 @@ The GitHub release for each version is the canonical record. It contains the exa
|
|
|
92
109
|
|
|
93
110
|
```bash
|
|
94
111
|
sha256sum --check SHA256SUMS
|
|
95
|
-
gh attestation verify inttegro-
|
|
112
|
+
gh attestation verify inttegro-4.2.1.gem \
|
|
96
113
|
--repo zebodotdev/inttegro-sdk-ruby
|
|
97
114
|
```
|
|
98
115
|
|
data/lib/inttegro/client.rb
CHANGED
|
@@ -109,7 +109,9 @@ module Inttegro
|
|
|
109
109
|
base_url: T.nilable(String),
|
|
110
110
|
read_timeout: T.nilable(Numeric),
|
|
111
111
|
open_timeout: T.nilable(Numeric),
|
|
112
|
-
adapter: T.nilable(Types::Adapter)
|
|
112
|
+
adapter: T.nilable(Types::Adapter),
|
|
113
|
+
telemetry_enabled: T::Boolean,
|
|
114
|
+
tracer_provider: T.nilable(OpenTelemetry::Trace::TracerProvider)
|
|
113
115
|
).void
|
|
114
116
|
end
|
|
115
117
|
def initialize(
|
|
@@ -119,7 +121,9 @@ module Inttegro
|
|
|
119
121
|
base_url: DEFAULT_BASE_URL,
|
|
120
122
|
read_timeout: 30,
|
|
121
123
|
open_timeout: 10,
|
|
122
|
-
adapter: nil
|
|
124
|
+
adapter: nil,
|
|
125
|
+
telemetry_enabled: true,
|
|
126
|
+
tracer_provider: nil
|
|
123
127
|
)
|
|
124
128
|
provided_token = token || token_value
|
|
125
129
|
api_key ||= provided_token
|
|
@@ -128,7 +132,9 @@ module Inttegro
|
|
|
128
132
|
base_url: base_url,
|
|
129
133
|
read_timeout: read_timeout,
|
|
130
134
|
open_timeout: open_timeout,
|
|
131
|
-
adapter: adapter
|
|
135
|
+
adapter: adapter,
|
|
136
|
+
telemetry_enabled: telemetry_enabled,
|
|
137
|
+
tracer_provider: tracer_provider
|
|
132
138
|
), HTTPClient)
|
|
133
139
|
|
|
134
140
|
@orders = T.let(Resources::Orders.new(@http), Resources::Orders)
|
|
@@ -47,6 +47,50 @@ module Inttegro
|
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
class CheckoutInvoiceViewStatus < T::Enum
|
|
51
|
+
enums do
|
|
52
|
+
DRAFT = new("draft")
|
|
53
|
+
REQUIRES_PAYMENT = new("requires_payment")
|
|
54
|
+
OVERDUE = new("overdue")
|
|
55
|
+
PAID = new("paid")
|
|
56
|
+
EXPIRED = new("expired")
|
|
57
|
+
CANCELED = new("canceled")
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class CheckoutMobileMoneyDataNetwork < T::Enum
|
|
62
|
+
enums do
|
|
63
|
+
MTN = new("mtn")
|
|
64
|
+
VODAFONE = new("vodafone")
|
|
65
|
+
AIRTEL = new("airtel")
|
|
66
|
+
TELECEL = new("telecel")
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class CheckoutOrderStatus < T::Enum
|
|
71
|
+
enums do
|
|
72
|
+
PREPARING = new("preparing")
|
|
73
|
+
REQUIRES_PAYMENT = new("requires_payment")
|
|
74
|
+
COMPLETED = new("completed")
|
|
75
|
+
PAID = new("paid")
|
|
76
|
+
CANCELED = new("canceled")
|
|
77
|
+
EXPIRED = new("expired")
|
|
78
|
+
UNKNOWN = new("unknown")
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
class CheckoutPayRequestPaymentMethodDataType < T::Enum
|
|
83
|
+
enums do
|
|
84
|
+
MOBILE_MONEY = new("mobile_money")
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
class CheckoutPaymentMethodDataType < T::Enum
|
|
89
|
+
enums do
|
|
90
|
+
MOBILE_MONEY = new("mobile_money")
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
50
94
|
class ChimeEmailSchemaKind < T::Enum
|
|
51
95
|
enums do
|
|
52
96
|
GMAIL_VIEW_ACTION = new("gmail_view_action")
|
|
@@ -101,6 +145,16 @@ module Inttegro
|
|
|
101
145
|
end
|
|
102
146
|
end
|
|
103
147
|
|
|
148
|
+
class Currency < T::Enum
|
|
149
|
+
enums do
|
|
150
|
+
GHS = new("ghs")
|
|
151
|
+
USD = new("usd")
|
|
152
|
+
GBP = new("gbp")
|
|
153
|
+
EUR = new("eur")
|
|
154
|
+
CNY = new("cny")
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
104
158
|
class DeliveryChannel < T::Enum
|
|
105
159
|
enums do
|
|
106
160
|
EMAIL = new("email")
|
|
@@ -323,20 +377,6 @@ module Inttegro
|
|
|
323
377
|
end
|
|
324
378
|
end
|
|
325
379
|
|
|
326
|
-
class OrderPaymentStatus < T::Enum
|
|
327
|
-
enums do
|
|
328
|
-
INITIATED = new("initiated")
|
|
329
|
-
REQUIRES_ACTION = new("requires_action")
|
|
330
|
-
OVERDUE = new("overdue")
|
|
331
|
-
EXECUTED = new("executed")
|
|
332
|
-
PAID = new("paid")
|
|
333
|
-
CANCELED = new("canceled")
|
|
334
|
-
EXPIRED = new("expired")
|
|
335
|
-
FAILED = new("failed")
|
|
336
|
-
UNKNOWN = new("unknown")
|
|
337
|
-
end
|
|
338
|
-
end
|
|
339
|
-
|
|
340
380
|
class OrderProductLineItemType < T::Enum
|
|
341
381
|
enums do
|
|
342
382
|
PRODUCT = new("product")
|
|
@@ -422,6 +462,20 @@ module Inttegro
|
|
|
422
462
|
end
|
|
423
463
|
end
|
|
424
464
|
|
|
465
|
+
class PaymentStatus < T::Enum
|
|
466
|
+
enums do
|
|
467
|
+
INITIATED = new("initiated")
|
|
468
|
+
REQUIRES_ACTION = new("requires_action")
|
|
469
|
+
OVERDUE = new("overdue")
|
|
470
|
+
EXECUTED = new("executed")
|
|
471
|
+
PAID = new("paid")
|
|
472
|
+
CANCELED = new("canceled")
|
|
473
|
+
EXPIRED = new("expired")
|
|
474
|
+
FAILED = new("failed")
|
|
475
|
+
UNKNOWN = new("unknown")
|
|
476
|
+
end
|
|
477
|
+
end
|
|
478
|
+
|
|
425
479
|
class PayoutStatus < T::Enum
|
|
426
480
|
enums do
|
|
427
481
|
INITIALIZED = new("initialized")
|