Class: BatchlyApi::CreateProjectRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/batchly_api/models/create_project_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



19
20
21
# File 'lib/batchly_api/models/create_project_request.rb', line 19

def method_missing (method_name)
  puts "there's no method called '#{method_name}'"
end

Instance Attribute Details

#account_idString

Identifier of the Account in which the project resides

Returns:

  • (String)


8
9
10
# File 'lib/batchly_api/models/create_project_request.rb', line 8

def 
  @account_id
end

#nameString

Name of the project

Returns:

  • (String)


12
13
14
# File 'lib/batchly_api/models/create_project_request.rb', line 12

def name
  @name
end

#vpcVpcDetails

VPC Information for projects which are restricted to use a given infrastructure zone

Returns:



16
17
18
# File 'lib/batchly_api/models/create_project_request.rb', line 16

def vpc
  @vpc
end

Instance Method Details

#key_mapObject

Defines the key map for json serialization



30
31
32
33
34
35
36
# File 'lib/batchly_api/models/create_project_request.rb', line 30

def key_map
  hash = {}
  hash['AccountId'] = self.
  hash['Name'] = self.name
  hash['Vpc'] = self.vpc
  hash
end

#to_jsonObject

Creates JSON of the curent object



24
25
26
27
# File 'lib/batchly_api/models/create_project_request.rb', line 24

def to_json
  hash = self.key_map()
  hash.to_json
end