class Ey::Core::Client::Billing

Public Instance Methods

get(params) click to toggle source
# File lib/ey-core/models/billing.rb, line 24
def get(params)
  merge_attributes(connection.get_billing(params).body["billing"])
end
new(attributes = {}) click to toggle source
# File lib/ey-core/models/billing.rb, line 5
def new(attributes = {})
  self.class.new(attributes.merge(:connection => self.connection))
end
put_state(id, state) click to toggle source
# File lib/ey-core/models/billing.rb, line 9
def put_state(id, state)
  b = self.class.new(:connection => self.connection)
  b.id = id
  b.state = state
  b.save!
end
save!() click to toggle source
# File lib/ey-core/models/billing.rb, line 16
def save!
  params = {
    "id"    => self.id,
    "state" => self.state
  }
  merge_attributes(self.connection.update_billing(params).body["billing"])
end