Class: StraddlePay::Resources::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/straddle_pay/resources/base.rb

Overview

Base class for API resources. Provides header extraction for Straddle-specific headers (account scoping, request tracking, idempotency).

Constant Summary collapse

HEADER_KEYS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  straddle_account_id: "Straddle-Account-Id",
  request_id: "Request-Id",
  correlation_id: "Correlation-Id",
  idempotency_key: "Idempotency-Key"
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Base

Returns a new instance of Base.

Parameters:

  • client (Client)

    the HTTP client instance



18
19
20
# File 'lib/straddle_pay/resources/base.rb', line 18

def initialize(client)
  @client = client
end