Class: Fastbill::Automatic::Request::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/fastbill-automatic/request/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/fastbill-automatic/request/base.rb', line 8

def initialize(info)
  @info = info
end

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



5
6
7
# File 'lib/fastbill-automatic/request/base.rb', line 5

def info
  @info
end

#responseObject

Returns the value of attribute response.



6
7
8
# File 'lib/fastbill-automatic/request/base.rb', line 6

def response
  @response
end

Instance Method Details

#performObject



12
13
14
15
16
17
18
# File 'lib/fastbill-automatic/request/base.rb', line 12

def perform
  raise AuthenticationError if Fastbill::Automatic.api_key.nil? || Fastbill::Automatic.email.nil?
  connection.setup_https
  send_request

  validator.validated_data_for(response)
end