Class: Freee::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/freee/base.rb
Direct Known Subclasses
Account, Amount, Company, Deal, Item, Partner, Tax, Transfer, User, Wallet, Walletable
Constant Summary
collapse
- @@client_id =
nil
- @@secret_key =
nil
- @@token =
nil
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
22
|
# File 'lib/freee/base.rb', line 22
def initialize; end
|
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
14
15
16
|
# File 'lib/freee/base.rb', line 14
def client
@client
end
|
Class Method Details
.config(client_id, secret_key, token) ⇒ Object
16
17
18
19
20
|
# File 'lib/freee/base.rb', line 16
def self.config(client_id, secret_key, token)
@@client_id = client_id.to_s
@@secret_key = secret_key.to_s
@@token = token.to_s
end
|
Instance Method Details
#get(path) ⇒ Object
37
38
39
|
# File 'lib/freee/base.rb', line 37
def get(path)
@client.get(path).response.env[:body]
end
|
#token ⇒ Object
29
30
31
|
# File 'lib/freee/base.rb', line 29
def token
@@token
end
|
#token=(token) ⇒ Object
33
34
35
|
# File 'lib/freee/base.rb', line 33
def token=(token)
@@token = token
end
|