module Segurocomar::Core::Insurance
Public Instance Methods
get_insurer(id, insurable_kind)
click to toggle source
# File lib/segurocomar/core/insurance.rb, line 10 def get_insurer(id, insurable_kind) result = get_request("/insurers/#{id}", { insurable_kind: insurable_kind }) Segurocomar::Entity::Insurer.new(result[:body]) end
get_insurers(insurable_kind)
click to toggle source
# File lib/segurocomar/core/insurance.rb, line 4 def get_insurers(insurable_kind) results = get_request("/insurers", { insurable_kind: insurable_kind }) results[:body].map { |r| Segurocomar::Entity::Insurer.new(r) } end
get_product(id)
click to toggle source
# File lib/segurocomar/core/insurance.rb, line 22 def get_product(id) result = get_request("/products/#{id}") Segurocomar::Entity::Product.new(result[:body]) end
get_products(args={})
click to toggle source
# File lib/segurocomar/core/insurance.rb, line 16 def get_products(args={}) results = get_request("/products", args) results[:body].map { |r| Segurocomar::Entity::Product.new(r) } end