Class: FedenaSdk::Batch
Instance Attribute Summary collapse
-
#course_code ⇒ Object
Returns the value of attribute course_code.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#name ⇒ Object
Returns the value of attribute name.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Class Method Summary collapse
Methods inherited from Model
attr_accessor, #attributes, #attributes_hash, get, #get, #initialize, #post, post, request, #request
Constructor Details
This class inherits a constructor from FedenaSdk::Model
Instance Attribute Details
#course_code ⇒ Object
Returns the value of attribute course_code.
3 4 5 |
# File 'lib/fedena_sdk/batch.rb', line 3 def course_code @course_code end |
#end_date ⇒ Object
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/fedena_sdk/batch.rb', line 3 def end_date @end_date end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/fedena_sdk/batch.rb', line 3 def name @name end |
#start_date ⇒ Object
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/fedena_sdk/batch.rb', line 3 def start_date @start_date end |
Class Method Details
.search(query) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/fedena_sdk/batch.rb', line 5 def self.search(query) url = '/api/batches' params = { search: query } = { params: params } hash = get(url, ) hash['batch_detail']['batch'].map do |batch_hash| new batch_hash end end |