Module: MerbMerchant::PostsData

Overview

:nodoc:

Constant Summary collapse

MAX_RETRIES =
3
OPEN_TIMEOUT =
60
READ_TIMEOUT =
60

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/merb_merchant/lib/posts_data.rb', line 13

def self.included(base)
  base.superclass_delegating_accessor :ssl_strict
  base.ssl_strict = true
  
  base.class_inheritable_accessor :pem_password
  base.pem_password = false
  
  base.class_inheritable_accessor :retry_safe
  base.retry_safe = false

  base.superclass_delegating_accessor :open_timeout
  base.open_timeout = OPEN_TIMEOUT

  base.superclass_delegating_accessor :read_timeout
  base.read_timeout = READ_TIMEOUT
end

Instance Method Details

#ssl_get(url, headers = {}) ⇒ Object



30
31
32
# File 'lib/merb_merchant/lib/posts_data.rb', line 30

def ssl_get(url, headers={})
  ssl_request(:get, url, nil, headers)
end

#ssl_post(url, data, headers = {}) ⇒ Object



34
35
36
# File 'lib/merb_merchant/lib/posts_data.rb', line 34

def ssl_post(url, data, headers = {})
  ssl_request(:post, url, data, headers)
end