Class: Centaman::Service::GiftTicket

Inherits:
Centaman::Service show all
Includes:
JsonWrapper
Defined in:
lib/centaman/service/gift_ticket.rb

Constant Summary

Constants inherited from Centaman::Service

DEFAULT_TIMEOUT_TIME

Constants inherited from Wrapper

Wrapper::FIXIE

Instance Attribute Summary collapse

Attributes inherited from Wrapper

#api_password, #api_token, #api_username

Instance Method Summary collapse

Methods included from JsonWrapper

#additional_hash_to_serialize_after_response, #build_object, #build_objects, #objects

Methods inherited from Centaman::Service

#after_post, #fetch_all, #payload, #payload_key, #post, #wrap_request_in_case_of_timeout

Methods inherited from Wrapper

#generate_token, #headers, #initialize, #options_hash

Constructor Details

This class inherits a constructor from Centaman::Wrapper

Instance Attribute Details

#department_idObject (readonly)

Returns the value of attribute department_id.



4
5
6
# File 'lib/centaman/service/gift_ticket.rb', line 4

def department_id
  @department_id
end

Instance Method Details

#after_init(args) ⇒ Object



6
7
8
# File 'lib/centaman/service/gift_ticket.rb', line 6

def after_init(args)
  @department_id = args[:department_id] || 100067
end

#endpointObject



10
11
12
# File 'lib/centaman/service/gift_ticket.rb', line 10

def endpoint
  '/ticket_services/Ticket'
end

#object_classObject



14
15
16
# File 'lib/centaman/service/gift_ticket.rb', line 14

def object_class
  Centaman::Object::GiftTicket
end

#optionsObject



18
19
20
21
22
# File 'lib/centaman/service/gift_ticket.rb', line 18

def options
  super + [
    { key: 'DepartmentID', value: department_id }
  ]
end