Method: GoodData::Model::ToWire.to_wire

Defined in:
lib/gooddata/models/blueprint/to_wire.rb

.to_wire(what) ⇒ Hash

Entry method. Converts ProjectBlueprint representation into wire format which is understood by the API

Parameters:

  • fact (Hash)

    Project blueprint represenation

  • dataset (Hash)

    Dataset blueprint hash represenation

Returns:

  • (Hash)

    Manifest for a particular reference



171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/gooddata/models/blueprint/to_wire.rb', line 171

def self.to_wire(what)
  {
    diffRequest: {
      targetModel: {
        projectModel: {
          modelMetadata: { containCA: what[:include_ca] },
          datasets: (what[:datasets] || []).map { |d| dataset_to_wire(what, d) },
          dateDimensions: (what[:date_dimensions] || []).map { |d| date_dimension_to_wire(what, d) }
        }
      }
    }
  }
end