Sha256: 7e30c40ff4a2f9123d529db43523fa48849f86d45d7f3733943c32e23f819967
Contents?: true
Size: 547 Bytes
Versions: 7
Compression:
Stored size: 547 Bytes
Contents
# frozen_string_literal: true require 'time' require 'fractal_api/base_model' module FractalApi class Company < BaseModel attributes :id, :name, :description, :website, :industry, :address, :external_id, :crn, :created_at def self.create(company) result = post('/company/v2/companies', params: company.as_json) build(json: result.body) end def self.build(json:) super.tap do |record| record.created_at = Time.parse(record.created_at) if record.created_at end end end end
Version data entries
7 entries across 7 versions & 1 rubygems