Sha256: 9bc007feab6fcfe504e4876ba1c33ff1abdcc1fe179eef0117b79224052b8e42
Contents?: true
Size: 446 Bytes
Versions: 5
Compression:
Stored size: 446 Bytes
Contents
module PayuAPI class ApiRequest < Request extend Dry::Initializer::Mixin param :client param :method param :url param :params, default: proc { nil } private def sandbox? client.sandbox end def headers { 'Content-Type' => 'application/json', 'Authorization' => "Bearer #{client.auth_token}" } end def body JSON.generate(params) if params end end end
Version data entries
5 entries across 5 versions & 1 rubygems