Class: EasySMS::AccountResource
- Inherits:
-
Struct
- Object
- Struct
- EasySMS::AccountResource
- Defined in:
- lib/easy_sms/account_resource.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client
2 3 4 |
# File 'lib/easy_sms/account_resource.rb', line 2 def client @client end |
Instance Method Details
#get ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/easy_sms/account_resource.rb', line 3 def get res = client.get('', {}) JSON.parse(res).tap do |json| json['c_at'] = Time.parse(json['c_at']) if json['c_at'] end end |
#update(attrs = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/easy_sms/account_resource.rb', line 11 def update(attrs = {}) res = client.put('', attrs) JSON.parse(res) end |