Sha256: b70d819bbd26fc2a9f25c8f4af8675f7ffa3d61e10582f19b45d6a4a9453ff5a
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
module EZAPIClient class Client include Virtus.model attribute :host, String attribute :username, String attribute :password, String attribute :eks_path, String attribute :prv_path, String attribute :logger, Object attribute :log, Boolean def create_transaction(args) opts = default_opts.merge(args) request = CreateTransactionRequest.new(opts) error_messages = CreateTransactionRequestSchema. (request.attributes).messages(full: true).values fail ArgumentError, error_messages if error_messages.any? CreateTransactionResponse.new(raw_response: request.()) end def check_transaction(args) opts = default_opts.merge(args) request = CheckTransactionRequest.new(opts) error_messages = CheckTransactionRequestSchema. (request.attributes).messages(full: true).values fail ArgumentError, error_messages if error_messages.any? CheckTransactionResponse.new(raw_response: request.()) end private def default_opts attributes end end end
Version data entries
10 entries across 10 versions & 1 rubygems