Sha256: 27431d1560076bb810451c0cfd648bd91aa3c9fc0ea073f007a133cc0fd55095

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

module StellarClient
  class GetFeesResponse < BaseResponse

    attribute(:body, Coercers::IndifferentHash, {
      lazy: true,
      default: :default_body,
    })
    attribute :fee, BigDecimal, lazy: true, default: :default_fee
    attribute :error, String, lazy: true, default: :default_error

    private

    def default_body
      JSON.parse(raw_response.body)
    end

    def default_fee
      body[:fee]
    end

    def default_error
      body[:error]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stellar_client-0.8.0 lib/stellar_client/responses/get_fees_response.rb
stellar_client-0.7.0 lib/stellar_client/responses/get_fees_response.rb