Class: Nibo::Account

Constant Summary

Constants included from ApiResource

Nibo::ApiResource::BASE_URL

Class Method Summary collapse

Methods included from Nibo::ApiResource::Delete

#delete, included

Methods included from Nibo::ApiResource::List

included, #list

Methods included from Nibo::ApiResource::Retrieve

included, #retrieve

Methods included from Nibo::ApiResource::Create

#create, included

Methods included from ApiResource

#api_request, #encode, included, #url_encode

Methods inherited from Object

class_name, #create_fields, create_from, #initialize, #metaclass, #refresh_object, #set_properties, #to_hash, #to_json, #to_s, url

Constructor Details

This class inherits a constructor from Nibo::Object

Class Method Details

.object_param(param, method) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/nibo/account.rb', line 21

def self.object_param(param, method)
  case method
    when :get, :delete
      {accountId: param}
    when :post
      param
  end
end

.url_method(method) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/nibo/account.rb', line 9

def self.url_method(method)
  case method
    when :get
      '/GetAccount'
    when :post
      '/CreateAccount'
    when :delete
      '/DeleteAccount'
  end

end