Sha256: dca038cad052de1b59b69da1f6c4f03d3f3ee71870cab07c0aca91872b85736e

Contents?: true

Size: 524 Bytes

Versions: 8

Compression:

Stored size: 524 Bytes

Contents

module Xhash
  class SAT < ApiClient
    def self.get_rfc(
      name: nil, last_name: nil, mothers_last_name: nil, birth_date: nil
    )
      url = 'sat/get-rfc'
      body = {
        name: name,
        last_name: last_name,
        mothers_last_name: mothers_last_name,
        birth_date: birth_date
      }
      response = api_post(url: url, body: body)
      raise Xhash::MissingRequiredFieldError.new(response) unless response[:rfc]
      Xhash::RFC.new(*response.values_at(*Xhash::RFC.members))
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xhash_client-0.3.8 lib/xhash/sat.rb
xhash_client-0.3.7 lib/xhash/sat.rb
xhash_client-0.3.6 lib/xhash/sat.rb
xhash_client-0.3.5 lib/xhash/sat.rb
xhash_client-0.3.4 lib/xhash/sat.rb
xhash_client-0.3.3 lib/xhash/sat.rb
xhash_client-0.3.2 lib/xhash/sat.rb
xhash_client-0.3.1 lib/xhash/sat.rb