Class: Vpsa::Client
- Inherits:
-
Object
show all
- Extended by:
- ClassMethods
- Includes:
- HTTParty
- Defined in:
- lib/vpsa/client.rb
Direct Known Subclasses
Api::CategoryLevels, Api::ClientClasses, Api::Companies, Api::CreditLimits, Api::DefaultEntries, Api::Entities, Api::Installments, Api::Orders, Api::ProductCategories, Api::Products, Api::Provisions, Api::Receipts, Api::SalesHistory, Api::Sellers, Api::ThirdParties, Api::UserData
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.
18
19
20
21
|
# File 'lib/vpsa/client.rb', line 18
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.
16
17
18
|
# File 'lib/vpsa/client.rb', line 16
def access_token
@access_token
end
|
Instance Method Details
#category_levels ⇒ Object
79
80
81
|
# File 'lib/vpsa/client.rb', line 79
def category_levels
Vpsa::Api::CategoryLevels.new(@access_token)
end
|
#client_classes ⇒ Object
55
56
57
|
# File 'lib/vpsa/client.rb', line 55
def client_classes
Vpsa::Api::ClientClasses.new(@access_token)
end
|
#companies ⇒ Object
67
68
69
|
# File 'lib/vpsa/client.rb', line 67
def companies
Vpsa::Api::Companies.new(@access_token)
end
|
#credit_limits ⇒ Object
47
48
49
|
# File 'lib/vpsa/client.rb', line 47
def credit_limits
Vpsa::Api::CreditLimits.new(@access_token)
end
|
#default_entries ⇒ Object
31
32
33
|
# File 'lib/vpsa/client.rb', line 31
def default_entries
Vpsa::Api::DefaultEntries.new(@access_token)
end
|
#entities ⇒ Object
27
28
29
|
# File 'lib/vpsa/client.rb', line 27
def entities
Vpsa::Api::Entities.new(@access_token)
end
|
#installments ⇒ Object
43
44
45
|
# File 'lib/vpsa/client.rb', line 43
def installments
Vpsa::Api::Installments.new(@access_token)
end
|
#orders ⇒ Object
63
64
65
|
# File 'lib/vpsa/client.rb', line 63
def orders
Vpsa::Api::Orders.new(@access_token)
end
|
#product_categories ⇒ Object
83
84
85
|
# File 'lib/vpsa/client.rb', line 83
def product_categories
Vpsa::Api::ProductCategories.new(@access_token)
end
|
#products ⇒ Object
75
76
77
|
# File 'lib/vpsa/client.rb', line 75
def products
Vpsa::Api::Products.new(@access_token)
end
|
#provisions ⇒ Object
35
36
37
|
# File 'lib/vpsa/client.rb', line 35
def provisions
Vpsa::Api::Provisions.new(@access_token)
end
|
#receipts ⇒ Object
51
52
53
|
# File 'lib/vpsa/client.rb', line 51
def receipts
Vpsa::Api::Receipts.new(@access_token)
end
|
#sales_history ⇒ Object
59
60
61
|
# File 'lib/vpsa/client.rb', line 59
def sales_history
Vpsa::Api::SalesHistory.new(@access_token)
end
|
#sellers ⇒ Object
71
72
73
|
# File 'lib/vpsa/client.rb', line 71
def sellers
Vpsa::Api::Sellers.new(@access_token)
end
|
#third_parties ⇒ Object
23
24
25
|
# File 'lib/vpsa/client.rb', line 23
def third_parties
Vpsa::Api::ThirdParties.new(@access_token)
end
|
#user_data ⇒ Object
39
40
41
|
# File 'lib/vpsa/client.rb', line 39
def user_data
Vpsa::Api::UserData.new(@access_token)
end
|