Sha256: f84eae8922239279eb46b9d57548b849ee9165982fa5926a2ef0e2a360e8cf0c
Contents?: true
Size: 591 Bytes
Versions: 54
Compression:
Stored size: 591 Bytes
Contents
class Ey::Core::Client::Billing < Ey::Core::Model identity :id attribute :state def new(attributes = {}) self.class.new(attributes.merge(:connection => self.connection)) end def put_state(id, state) b = self.class.new(:connection => self.connection) b.id = id b.state = state b.save! end def save! params = { "id" => self.id, "state" => self.state } merge_attributes(self.connection.update_billing(params).body["billing"]) end def get(params) merge_attributes(connection.get_billing(params).body["billing"]) end end
Version data entries
54 entries across 54 versions & 3 rubygems