Class: ShiprocketAPI::CourierServiceability::Collection

Inherits:
ActiveResource::Collection
  • Object
show all
Defined in:
lib/shiprocket_api/resources/courier_serviceability.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed = {}) ⇒ Collection

Returns a new instance of Collection.



14
15
16
17
18
19
20
21
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 14

def initialize(parsed = {})
  @is_recommendation_enabled = parsed["data"]["is_recommendation_enabled"]
  @recommended_by = parsed["data"]["recommended_by"]
  @child_courier_id = parsed["data"]["child_courier_id"]
  @recommended_courier_company_id = parsed["data"]["recommended_courier_company_id"]
  @shiprocket_recommended_courier_id = parsed["data"]["shiprocket_recommended_courier_id"]
  @elements = parsed["data"]["available_courier_companies"]
end

Instance Attribute Details

#child_courier_idObject

Returns the value of attribute child_courier_id.



7
8
9
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 7

def child_courier_id
  @child_courier_id
end

#elementsObject

Returns the value of attribute elements.



7
8
9
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 7

def elements
  @elements
end

#is_recommendation_enabledObject

Returns the value of attribute is_recommendation_enabled.



7
8
9
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 7

def is_recommendation_enabled
  @is_recommendation_enabled
end

Returns the value of attribute recommended_by.



7
8
9
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 7

def recommended_by
  @recommended_by
end

Returns the value of attribute recommended_courier_company_id.



7
8
9
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 7

def recommended_courier_company_id
  @recommended_courier_company_id
end

Returns the value of attribute shiprocket_recommended_courier_id.



7
8
9
# File 'lib/shiprocket_api/resources/courier_serviceability.rb', line 7

def shiprocket_recommended_courier_id
  @shiprocket_recommended_courier_id
end