Class: Rafflesia::DatabaseJoinCertifications
- Inherits:
-
Object
- Object
- Rafflesia::DatabaseJoinCertifications
- Defined in:
- lib/rafflesia/database_join_certifications.rb
Instance Method Summary collapse
-
#create(from_database:, from_release:, to_database:, to_release:, budget: nil, dataset_name: nil, dataset_version: nil, ontology_digest: nil, safety: nil, request_options: {}) ⇒ Rafflesia::EnvelopeDatabaseJoinCertificationData
POST /v1/database_join_certifications.
-
#initialize(client) ⇒ DatabaseJoinCertifications
constructor
A new instance of DatabaseJoinCertifications.
Constructor Details
#initialize(client) ⇒ DatabaseJoinCertifications
Returns a new instance of DatabaseJoinCertifications.
9 10 11 |
# File 'lib/rafflesia/database_join_certifications.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#create(from_database:, from_release:, to_database:, to_release:, budget: nil, dataset_name: nil, dataset_version: nil, ontology_digest: nil, safety: nil, request_options: {}) ⇒ Rafflesia::EnvelopeDatabaseJoinCertificationData
POST /v1/database_join_certifications
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/database_join_certifications.rb', line 25 def create( from_database:, from_release:, to_database:, to_release:, budget: nil, dataset_name: nil, dataset_version: nil, ontology_digest: nil, safety: nil, request_options: {} ) body = { 'budget' => budget, 'dataset_name' => dataset_name, 'dataset_version' => dataset_version, 'from_database' => from_database, 'from_release' => from_release, 'ontology_digest' => ontology_digest, 'safety' => safety, 'to_database' => to_database, 'to_release' => to_release }.compact response = @client.request( method: :post, path: '/v1/database_join_certifications', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeDatabaseJoinCertificationData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |