Class: SpreePacketa::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/spree_packeta/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



31
32
33
34
35
36
37
# File 'lib/spree_packeta/configuration.rb', line 31

def initialize
  @soap_endpoint = 'http://www.zasilkovna.cz/api/soap'
  @rate_cache_duration = 3600 # 1 hour
  @auto_create_packets = true
  @tracking_sync_interval = 3600 # 1 hour in seconds
  @wsdl_path = 'http://www.zasilkovna.cz/api/soap.wsdl'
end

Instance Attribute Details

#api_passwordObject

API credentials



6
7
8
# File 'lib/spree_packeta/configuration.rb', line 6

def api_password
  @api_password
end

#auto_create_packetsObject

Auto-create packets on shipment



23
24
25
# File 'lib/spree_packeta/configuration.rb', line 23

def auto_create_packets
  @auto_create_packets
end

#eshopObject

Default eshop identifier



12
13
14
# File 'lib/spree_packeta/configuration.rb', line 12

def eshop
  @eshop
end

#rate_cache_durationObject

Rate caching duration (in seconds)



20
21
22
# File 'lib/spree_packeta/configuration.rb', line 20

def rate_cache_duration
  @rate_cache_duration
end

#sender_emailObject

Returns the value of attribute sender_email.



16
17
18
# File 'lib/spree_packeta/configuration.rb', line 16

def sender_email
  @sender_email
end

#sender_nameObject

Sender information for return labels



15
16
17
# File 'lib/spree_packeta/configuration.rb', line 15

def sender_name
  @sender_name
end

#sender_phoneObject

Returns the value of attribute sender_phone.



17
18
19
# File 'lib/spree_packeta/configuration.rb', line 17

def sender_phone
  @sender_phone
end

#soap_endpointObject

SOAP endpoint (production vs sandbox)



9
10
11
# File 'lib/spree_packeta/configuration.rb', line 9

def soap_endpoint
  @soap_endpoint
end

#tracking_sync_intervalObject

Sync tracking status interval



26
27
28
# File 'lib/spree_packeta/configuration.rb', line 26

def tracking_sync_interval
  @tracking_sync_interval
end

#wsdl_pathObject

WSDL file path (can be local or remote)



29
30
31
# File 'lib/spree_packeta/configuration.rb', line 29

def wsdl_path
  @wsdl_path
end