Class: Wes::Data::API::Billing

Inherits:
Object
  • Object
show all
Extended by:
Base
Defined in:
lib/wes/data/api/billing.rb

Class Method Summary collapse

Methods included from Base

add_state, client, configuration, map_objects, routes

Class Method Details

.create(data) ⇒ Object



11
12
13
14
# File 'lib/wes/data/api/billing.rb', line 11

def create(data)
  attributes = client.post(routes.billing, data).first
  attributes.nil? ? nil : model_klass.new(attributes)
end

.find(key, value) ⇒ Object



16
17
18
19
# File 'lib/wes/data/api/billing.rb', line 16

def find(key, value)
  attributes = client.get(find_route(key, value)).first
  attributes.nil? ? nil : model_klass.new(attributes)
end