huntrecht-sdk 0.3.0 → 0.3.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: b85ae259cf3bdc4580c2f24d9279d896516630b674a4944e534703f9efb3c7e3
4
- data.tar.gz: e52cc4ee6dc59c1f1b279726730826785d693a10b01f6244e16c311a133f9ef7
3
+ metadata.gz: 3962f65e3f48875e1a8fe2eb9dadbdb3c24bc6b820eaef8489d866bfa0d0dab1
4
+ data.tar.gz: c168b3b19f2b8fabd5d73b5cc117520b880cf8264eff35ad2cab795eda24d18d
5
5
  SHA512:
6
- metadata.gz: 797d1c4a1ec15a1b830cb4837710f73dab8d4f62e951451bd8831add85fa12e27ecb6e66e9a12f7f394f6e2b91edf6e6639700bcb37fa2723c93865596c9aee7
7
- data.tar.gz: 78d0cb94681c1ab3281ed113303035caafd7e678c4b9174aa99e21e3cd3c46870fc1610c53df6d7d8d19a4b0292c461493cef1727f1e12b808582ccb4bca8e6a
6
+ metadata.gz: cdae7c7adf5702cd508990d02356677f58f97320328713fe7a68213432058a0a953bfb549d0c77acfc4d3c940cfce59216b16bdff225837ceac075a5d3c35cbe
7
+ data.tar.gz: fd12e47593f598e915bb273bba6bc32c0dfd5f5f9c50d08c35f76d045f9a99f0d09a6cf386bfbd844e40b5d3e854a051d974d655124f90f14e7acbbea92e009b
@@ -50,13 +50,16 @@ module Huntrecht
50
50
  @users = Resources::UsersAPI.new(self)
51
51
  @storefront = Resources::StorefrontAPI.new(self)
52
52
  @price_drops = Resources::PriceDropsAPI.new(self)
53
+ @greencloud = Resources::GreenCloudAPI.new(self)
54
+ @arena = Resources::ArenaAPI.new(self)
53
55
  @app_proxy = Resources::AppProxyAPI.new(self)
54
56
  @linked_payments = Resources::LinkedPaymentsAPI.new(self)
55
57
  end
56
58
 
57
59
  attr_reader :auth, :clients, :orders, :payments, :subscriptions,
58
60
  :credit, :credit_risk, :kyc, :quotes, :users, :storefront,
59
- :price_drops, :app_proxy, :linked_payments
61
+ :price_drops, :app_proxy, :linked_payments,
62
+ :greencloud, :arena
60
63
 
61
64
  def client_secret
62
65
  @client_secret
@@ -260,6 +260,86 @@ module Huntrecht
260
260
  end
261
261
  end
262
262
 
263
+ # Published GreenCloud catalog pricing (public).
264
+ class GreenCloudAPI < Base
265
+ CALCULATOR_TERMS = [3, 6, 12, 24, 36].freeze
266
+
267
+ def pricing
268
+ request("GET", "/greencloud/pricing", auth_required: false)
269
+ end
270
+
271
+ def calculate_estimate(sku, nodes: 1, term_months: 12)
272
+ unless CALCULATOR_TERMS.include?(term_months)
273
+ raise ArgumentError, "term_months must be one of #{CALCULATOR_TERMS.join(", ")}"
274
+ end
275
+ unless nodes.is_a?(Integer) && nodes.between?(1, 256)
276
+ raise ArgumentError, "nodes must be an integer 1..256"
277
+ end
278
+ request("POST", "/greencloud/calculator",
279
+ json: { sku: sku, nodes: nodes, term_months: term_months },
280
+ auth_required: false)
281
+ end
282
+ end
283
+
284
+ # TradeArena execution/mutations (auth required).
285
+ class ArenaAPI < Base
286
+ def create_order(body)
287
+ request("POST", "/arena/orders", json: body)
288
+ end
289
+
290
+ def commit(order_id, body)
291
+ request("POST", "/arena/orders/#{order_id}/commit", json: body)
292
+ end
293
+
294
+ def settle(order_id, settlement_price)
295
+ request("POST", "/arena/orders/#{order_id}/settle",
296
+ json: { settlement_price: settlement_price })
297
+ end
298
+
299
+ def execute(order_id, body)
300
+ request("POST", "/arena/orders/#{order_id}/execute", json: body)
301
+ end
302
+
303
+ def generate(body)
304
+ request("POST", "/arena/agent/generate", json: body)
305
+ end
306
+
307
+ def generate_batch
308
+ request("POST", "/arena/agent/generate-batch")
309
+ end
310
+
311
+ def market_signal(body)
312
+ request("POST", "/arena/agent/market-signal", json: body)
313
+ end
314
+
315
+ def analyze_only(body)
316
+ request("POST", "/arena/agent/analyze-only", json: body)
317
+ end
318
+
319
+ def insurance_claim(order_id:, commitment_id:, claim_type:,
320
+ claimed_amount:, evidence:)
321
+ request("POST", "/arena/risk/insurance/claim",
322
+ params: { order_id: order_id, commitment_id: commitment_id,
323
+ claim_type: claim_type, claimed_amount: claimed_amount },
324
+ json: { evidence: evidence })
325
+ end
326
+
327
+ def bond_yield_order(bond_id, month)
328
+ request("POST", "/arena/bonds/#{bond_id}/yield-order",
329
+ json: { month: month })
330
+ end
331
+
332
+ def release_breaker(halt_id)
333
+ request("POST", "/arena/risk/circuit-breaker/release",
334
+ params: { halt_id: halt_id })
335
+ end
336
+
337
+ def reconcile(limit: 25, dry_run: true)
338
+ request("POST", "/arena/validation/reconcile",
339
+ params: { limit: limit, dry_run: dry_run })
340
+ end
341
+ end
342
+
263
343
  # Theme-safe proxy endpoints (public).
264
344
  class AppProxyAPI < Base
265
345
  def collections(first: 20, signature: nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Huntrecht
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huntrecht-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huntrecht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-12 00:00:00.000000000 Z
11
+ date: 2026-11-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: B2B commerce, credit risk, KYC, quotes, storefront, and payments for
14
14
  the Huntrecht Platform API v1.