Class: Vpsa::Client
- Inherits:
-
Object
show all
- Extended by:
- ClassMethods
- Includes:
- HTTParty
- Defined in:
- lib/vpsa/client.rb
Defined Under Namespace
Classes: NoAccessTokenError, Response
Instance Attribute Summary collapse
Instance Method Summary
collapse
require_all
Constructor Details
#initialize(access_token) ⇒ Client
Returns a new instance of Client.
16
17
18
19
|
# File 'lib/vpsa/client.rb', line 16
def initialize(access_token)
raise NoAccessTokenError if access_token.nil? || access_token.strip == ""
@access_token = access_token
end
|
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
14
15
16
|
# File 'lib/vpsa/client.rb', line 14
def access_token
@access_token
end
|
Instance Method Details
#credit_limits ⇒ Object
45
46
47
|
# File 'lib/vpsa/client.rb', line 45
def credit_limits
Vpsa::Api::CreditLimits.new(@access_token)
end
|
#default_entries ⇒ Object
#entities ⇒ Object
25
26
27
|
# File 'lib/vpsa/client.rb', line 25
def entities
Vpsa::Api::Entities.new(@access_token)
end
|
#provisions ⇒ Object
33
34
35
|
# File 'lib/vpsa/client.rb', line 33
def provisions
Vpsa::Api::Provisions.new(@access_token)
end
|
#receipts ⇒ Object
49
50
51
|
# File 'lib/vpsa/client.rb', line 49
def receipts
Vpsa::Api::Receipts.new(@access_token)
end
|
#sales ⇒ Object
57
58
59
|
# File 'lib/vpsa/client.rb', line 57
def sales
Vpsa::Api::Sales.new(@access_token)
end
|
#third_parties ⇒ Object
21
22
23
|
# File 'lib/vpsa/client.rb', line 21
def third_parties
Vpsa::Api::ThirdParties.new(@access_token)
end
|
#user_data ⇒ Object
37
38
39
|
# File 'lib/vpsa/client.rb', line 37
def user_data
Vpsa::Api::UserData.new(@access_token)
end
|