Class: SpreeCmCommissioner::Integrations::BookMeBusV1::Resources::Operator

Inherits:
Base
  • Object
show all
Defined in:
app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/operator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

from_json_api, from_json_api_item, from_json_api_single, #initialize

Constructor Details

This class inherits a constructor from SpreeCmCommissioner::Integrations::BookMeBusV1::Resources::Base

Instance Attribute Details

#idObject

Returns the value of attribute id.



3
4
5
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/operator.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/operator.rb', line 3

def name
  @name
end

#slugObject

Returns the value of attribute slug.



3
4
5
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/operator.rb', line 3

def slug
  @slug
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/operator.rb', line 3

def type
  @type
end

Instance Method Details

#to_hObject



8
9
10
11
12
13
14
15
# File 'app/services/spree_cm_commissioner/integrations/book_me_bus_v1/resources/operator.rb', line 8

def to_h
  {
    id: id,
    type: type,
    name: name,
    slug: slug
  }.compact
end