Class: VertexClient::Resource::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/vertex_client/resources/base.rb

Direct Known Subclasses

Invoice, Quotation, TaxArea

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/vertex_client/resources/base.rb', line 6

def initialize(params)
  @payload = payload_type.new(params)
end

Instance Method Details

#config_keyObject



14
15
16
# File 'lib/vertex_client/resources/base.rb', line 14

def config_key
  demodulized_class_name.underscore.to_sym
end

#resultObject



10
11
12
# File 'lib/vertex_client/resources/base.rb', line 10

def result
  @result ||= (response ? formatted_response : fallback_response)
end